[Teneo+hibernate] [message #605180] |
Wed, 02 May 2007 07:36 |
Roman Bliznets Messages: 75 Registered: July 2009 |
Member |
|
|
Hello.
I'm use emf 2.3.0.v200703291501, teneo 0.8.0.v200704230019, hibernate 3.2,
database MySQL.
I convert XSD into Ecore model. After
Teneo maps Ecore into database wrong.
Wrong column types.
First Problem:
in XSD:
<xs:simpleType name="Count2Type">
<xs:annotation>
<xs:documentation>Number. form 1. to 2 digit. </xs:documentation>
</xs:annotation>
<xs:restriction base="CategoryCust:IntegerCategoriesCust">
<xs:totalDigits value="2"/>
<xs:minInclusive value="1"/>
</xs:restriction>
</xs:simpleType>
in DataBase type of column: DECIMAL(2,2) (should be DECIMAL(2,0))
I take xml mapping (hbds.getMappingXML();) from datastore
---
<property name="subLineNumber" lazy="false" insert="true" update="true"
not-null="false" unique="false" type="java.math.BigInteger">
<column not-null="false" unique="false" name="`sublinenumber`"
precision="2"/>
</property>
---
Second Problem:
in XSD:
<xs:simpleType name="Code2Type">
<xs:annotation>
<xs:documentation>Code. 2 symbols</xs:documentation>
</xs:annotation>
<xs:restriction base="CategoryCust:CodeCategoriesCust">
<xs:length value="2"/>
</xs:restriction>
</xs:simpleType>
in DataBase type of column: varchar(1) (should be varchar(2)) but not for
every column;
in xml mapping:
---
<property name="goodsStatus" lazy="false" insert="true" update="true"
not-null="false" unique="false" type="java.lang.String">
<column not-null="false" unique="false" name="`goodsstatus`"
length="2"/>
</property>
---
Where is problem in Teneo or Hibernate?
P.S All types in Ecore equal to all types in XSD.
|
|
|
Powered by
FUDForum. Page generated in 0.03235 seconds