Hi,
i need mappings for a db2 database. unfortunately a db2 mapping does not yet exist (a db2 mapping file is attached to this mail).
so what steps do i have to perform to make that work. steps performed so far .
1. created a db2mapping file.
2. added the file to directory mda/plugin-resources/andromda/mappings/
3. added tag
<mergeMappingsUri>file:plugin-resources/andromda/mappings/DB2Mappings.xml</mergeMappingsUri>
to my mda/project.xml
4. changed the sql.mapping in the project.properties to DB2. (sql.mappings=DB2)
5. after running maven i can see that no sql-types have been replaced.
hibernate tags in my java source files still look like sql-type="$attribute.sqlType".
so what did i miss ? how can i add the db2 file so i can my classes that access the db2 ?
thx, Andreas
<?xml version="1.0" encoding="ISO-8859-1" ?> <!-- This is used to map the model types to DB2 types for generated code. --> <mappings name="DB2"> <mapping> <from>datatype.String</from> <to>VARCHAR(256)</to> </mapping> <mapping> <from>datatype.Date</from> <to>DATE</to> </mapping> <mapping> <from>datatype.Time</from> <to>TIME</to> </mapping> <mapping> <from>datatype.Timestamp</from> <to>TIMESTAMP</to> </mapping> <mapping> <from>datatype.char</from> <from>datatype.Character</from> <to>CHAR</to> </mapping> <mapping> <from>datatype.byte</from> <from>datatype.Byte</from> <to>CHAR BYTE</to> </mapping> <mapping> <from>datatype.short</from> <from>datatype.Short</from> <to>SMALLINT</to> </mapping> <mapping> <from>datatype.int</from> <from>datatype.Integer</from> <to>INTEGER</to> </mapping> <mapping> <from>datatype.long</from> <from>datatype.Long</from> <to>BIGINT</to> </mapping> <mapping> <from>datatype.float</from> <from>datatype.Float</from> <to>REAL</to> </mapping> <mapping> <from>datatype.double</from> <from>datatype.Double</from> <to>DOUBLE</to> </mapping> <mapping> <from>datatype.boolean</from> <from>datatype.Boolean</from> <to>SMALLINT</to> </mapping> <mapping> <from>datatype.Decimal</from> <from>datatype.decimal</from> <to>DECIMAL</to> </mapping> <mapping> <from>datatype.Clob</from> <to>CLOB</to> </mapping> <mapping> <from>datatype.Blob</from> <to>BLOB</to> </mapping> </mappings>