Sybase ASE 15: User data types mapped to java Object type [message #793215] |
Tue, 07 February 2012 17:23  |
Eclipse User |
|
|
|
Hi,
Is there a type mapping file somewhere for Sybase ASE? We have numerous custom data types ('ut_sysgen', for example, which is 'int'). Dali just makes them Object types when generating entities from tables.
I am using Indigo. I tried updating Sybase_ASE_15.x.xmi in org.eclipse.datatools.enablement.sybase.ase.dbdefinition_1.0.0.v200906161800.jar
by adding '<name>ut_sysgen</name>' in the element with INT and INTEGER, but it didn't pick it up there, maybe something to do with jdbcEnumType being different for a custom type, I don't know.
I know updating that file does something as I tried mucking with the Java types for other db types and it did change the code that was generated.
Any hints on where to configure this type mapping?
Thanks, Patrick
|
|
|
Re: Sybase ASE 15: User data types mapped to java Object type [message #794072 is a reply to message #793215] |
Wed, 08 February 2012 17:18  |
Eclipse User |
|
|
|
Quote:Any hints on where to configure this type mapping?
Patrick:
It sounds like you are headed in the right direction. This is more of a question for DTP[1]; since Dali just uses the DTP API. But here's some additional information that might help:
To derive the appropriate Java type declaration for generated fields, Dali use the DTP API as follows:
Dali calls
o.e.datatools.modelbase.sql.tables.Column.getDateType()
(implemented in ...schema.TypedElement) which returns a ...datatypes.DataType.
If this DataType is an instance of PredefinedDataType, Dali passes its name to
o.e.datatools.connectivity.sqm.core.definition.DatabaseDefinition.getPredefinedDataTypeDefinition(String)
which returns a ...dbdefinition.PredefinedDataTypeDefinition.
PredefinedDataTypeDefinition.getJavaClassName() returns a Java class name that Dali can then use in the code generation.
Maybe you can use this information to ask the appropriate questions of DTP.
Brian
[1] http://www.eclipse.org/forums/index.php/f/3/
|
|
|
Powered by
FUDForum. Page generated in 0.03755 seconds