Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » [Teneo+hibernate]
|
Re: [Teneo+hibernate] [message #81676 is a reply to message #81661] |
Wed, 02 May 2007 07:52 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi,
It seems that the problem is in Hibernate. Possibly the mapping logic of Teneo can be adapted to
give hibernate the right hints.
Can you try with log4j set to debugging? Then you can see how hibernate creates the tables in the
beginning, maybe this gives some more information.
You can manually change the mapping and see what works for you. If you post the updated mapping then
I can see how to adapt the mapping logic.
gr. Martin
wolf_roma wrote:
> 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.
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: [Teneo+hibernate] [message #81690 is a reply to message #81676] |
Wed, 02 May 2007 08:53 |
Roman Bliznets Messages: 75 Registered: July 2009 |
Member |
|
|
Ok, I set Log4j in debug mode;
First problem:
It solved if I manual add attribute: scale="0";
Second Problem:
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>
<property name="repairStatus" lazy="false" insert="true" update="true"
not-null="false" unique="false" type="java.lang.String">
<column not-null="false" unique="false" name="`repairstatus`"
length="2"/>
</property>
from log:
5157 [main] DEBUG org.hibernate.tool.hbm2ddl.SchemaUpdate - create table
`documentbasetype` (e_id bigint not null auto_increment, `dtype`
varchar(255) not null, e_version integer not null, `prdocumentname`
varchar(250), `prdocumentnumber` varchar(50), `prdocumentdate` varchar(255),
`complationauthoritydate` varchar(255), `linenumber` numeric(2,0),
`sublinenumber` varchar(2), `documentmodecode` varchar(4), `informationcode`
varchar(2), `perioddate` varchar(255), `conditiondate` varchar(255),
`saledate` varchar(255), `presentingdate` varchar(255), `goodsstatus`
varchar(1), `repairstatus` bit, `documentbeginactionsdat` varchar(255),
`documentendactionsdate` varchar(255), `organizationname` varchar(150),
`presentinglackingdate` varchar(255), `presenteddocumentmodecode`
varchar(4), `actnumber` varchar(50), `actdate` varchar(255),
`privelegedocumentmodecode` varchar(2), `excisemarkingmodecodetype`
varchar(1), `customspaymentmodecodetyp` varchar(2), `symbolsublinenumber`
varchar(1), `supplystatus` varchar(2), `exportdate` varchar(255),
`esadoutpresenteddocume_id` bigint, `esadoutpresenteddocum_idx` integer,
`esadcontractlisttype_a_id` bigint, `esadcontractlisttype__idx` integer,
econtainer_class varchar(255), e_container varchar(255),
e_container_featureid integer, primary key (e_id))
`goodsstatus` varchar(1) - should be varchar(2)
`repairstatus` bit - it big wrong :), should be varchar(2)
Another fields right;
May be I have to use definite Hibernate?
Can I take Teneo mapping and use it without Teneo? (How to do?)
Should I post in Hibernate.org about the bug?
you wrote:
> Hi,
> It seems that the problem is in Hibernate. Possibly the mapping logic of
> Teneo can be adapted to give hibernate the right hints.
> Can you try with log4j set to debugging? Then you can see how hibernate
> creates the tables in the beginning, maybe this gives some more
> information.
>
> You can manually change the mapping and see what works for you. If you
> post the updated mapping then I can see how to adapt the mapping logic.
>
> gr. Martin
>
|
|
|
Re: [Teneo+hibernate] [message #81705 is a reply to message #81690] |
Wed, 02 May 2007 09:05 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
The repairstatus is even more strange, is there by accident another eclass which also has a
repairstatus which is of another type (boolean)?
You can use the hbm in combination with Teneo. In this case Teneo will not do any automatic mapping
but will use the hbm file. See the option: PersistenceOptions.USE_MAPPING_FILE, here:
http://www.elver.org/hibernate/options.html
I would upgrade to the latest version of hibernate. Although I would surprised if that is the issue
here.
Can you try a join table mapping strategy? See the option:
PersistenceOptions.INHERITANCE_MAPPING
gr. Martin
wolf_roma wrote:
> Ok, I set Log4j in debug mode;
> First problem:
> It solved if I manual add attribute: scale="0";
>
> Second Problem:
> 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>
> <property name="repairStatus" lazy="false" insert="true" update="true"
> not-null="false" unique="false" type="java.lang.String">
> <column not-null="false" unique="false" name="`repairstatus`"
> length="2"/>
> </property>
>
> from log:
> 5157 [main] DEBUG org.hibernate.tool.hbm2ddl.SchemaUpdate - create table
> `documentbasetype` (e_id bigint not null auto_increment, `dtype`
> varchar(255) not null, e_version integer not null, `prdocumentname`
> varchar(250), `prdocumentnumber` varchar(50), `prdocumentdate` varchar(255),
> `complationauthoritydate` varchar(255), `linenumber` numeric(2,0),
> `sublinenumber` varchar(2), `documentmodecode` varchar(4), `informationcode`
> varchar(2), `perioddate` varchar(255), `conditiondate` varchar(255),
> `saledate` varchar(255), `presentingdate` varchar(255), `goodsstatus`
> varchar(1), `repairstatus` bit, `documentbeginactionsdat` varchar(255),
> `documentendactionsdate` varchar(255), `organizationname` varchar(150),
> `presentinglackingdate` varchar(255), `presenteddocumentmodecode`
> varchar(4), `actnumber` varchar(50), `actdate` varchar(255),
> `privelegedocumentmodecode` varchar(2), `excisemarkingmodecodetype`
> varchar(1), `customspaymentmodecodetyp` varchar(2), `symbolsublinenumber`
> varchar(1), `supplystatus` varchar(2), `exportdate` varchar(255),
> `esadoutpresenteddocume_id` bigint, `esadoutpresenteddocum_idx` integer,
> `esadcontractlisttype_a_id` bigint, `esadcontractlisttype__idx` integer,
> econtainer_class varchar(255), e_container varchar(255),
> e_container_featureid integer, primary key (e_id))
>
> `goodsstatus` varchar(1) - should be varchar(2)
> `repairstatus` bit - it big wrong :), should be varchar(2)
> Another fields right;
>
> May be I have to use definite Hibernate?
> Can I take Teneo mapping and use it without Teneo? (How to do?)
> Should I post in Hibernate.org about the bug?
>
> you wrote:
>> Hi,
>> It seems that the problem is in Hibernate. Possibly the mapping logic of
>> Teneo can be adapted to give hibernate the right hints.
>> Can you try with log4j set to debugging? Then you can see how hibernate
>> creates the tables in the beginning, maybe this gives some more
>> information.
>>
>> You can manually change the mapping and see what works for you. If you
>> post the updated mapping then I can see how to adapt the mapping logic.
>>
>> gr. Martin
>>
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: [Teneo+hibernate] [message #81766 is a reply to message #81705] |
Wed, 02 May 2007 15:06 |
Roman Bliznets Messages: 75 Registered: July 2009 |
Member |
|
|
I'm try to use PersistenceOptions.INHERITANCE_MAPPING and it solve my
problem with columnb types; (Same parent class has two children class with
identical filednames.)
I have another problem:
Hibernate: insert into goodsDescription (`processinggoodstype_go_id`,
`processinggoodstype_g_idx`, elt) values (?, ?, ?)
10781 [main] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error:
1364, SQLState: HY000
10781 [main] ERROR org.hibernate.util.JDBCExceptionReporter - Field
'goodsitembasetype_good_id' doesn't have a default value
List of varchar(250) (goodsDescription) is used in some comlex types;
In sql:
create table goodsDescription (
`goodsitembasetype_good_id` bigint not null,
elt varchar(255),
`goodsitembasetype_goo_idx` integer not null,
`goodsbasetype_goodsdes_id` bigint not null,
`goodsbasetype_goodsde_idx` integer not null,
`goodsgroupdescriptiont_id` bigint not null,
`goodsgroupdescription_idx` integer not null,
`processinggoodstype_go_id` bigint not null,
`processinggoodstype_g_idx` integer not null,
primary key (`processinggoodstype_go_id`,
`processinggoodstype_g_idx`)
)
What me to do?
Most probably that this is Hibernate mistake, but
I don't understand how fix it...
May be i send you my project?
|
|
|
Re: [Teneo+hibernate] [message #81780 is a reply to message #81766] |
Wed, 02 May 2007 15:15 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Can you just send me the ecore and the hbm files? This should be enough for me to look at.
gr. Martin
wolf_roma wrote:
> I'm try to use PersistenceOptions.INHERITANCE_MAPPING and it solve my
> problem with columnb types; (Same parent class has two children class with
> identical filednames.)
>
> I have another problem:
> Hibernate: insert into goodsDescription (`processinggoodstype_go_id`,
> `processinggoodstype_g_idx`, elt) values (?, ?, ?)
> 10781 [main] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error:
> 1364, SQLState: HY000
> 10781 [main] ERROR org.hibernate.util.JDBCExceptionReporter - Field
> 'goodsitembasetype_good_id' doesn't have a default value
>
> List of varchar(250) (goodsDescription) is used in some comlex types;
>
> In sql:
> create table goodsDescription (
> `goodsitembasetype_good_id` bigint not null,
> elt varchar(255),
> `goodsitembasetype_goo_idx` integer not null,
> `goodsbasetype_goodsdes_id` bigint not null,
> `goodsbasetype_goodsde_idx` integer not null,
> `goodsgroupdescriptiont_id` bigint not null,
> `goodsgroupdescription_idx` integer not null,
> `processinggoodstype_go_id` bigint not null,
> `processinggoodstype_g_idx` integer not null,
> primary key (`processinggoodstype_go_id`,
> `processinggoodstype_g_idx`)
> )
>
>
> What me to do?
> Most probably that this is Hibernate mistake, but
> I don't understand how fix it...
>
> May be i send you my project?
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
| | | | | |
Re: [Teneo+hibernate] [message #605185 is a reply to message #81661] |
Wed, 02 May 2007 07:52 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi,
It seems that the problem is in Hibernate. Possibly the mapping logic of Teneo can be adapted to
give hibernate the right hints.
Can you try with log4j set to debugging? Then you can see how hibernate creates the tables in the
beginning, maybe this gives some more information.
You can manually change the mapping and see what works for you. If you post the updated mapping then
I can see how to adapt the mapping logic.
gr. Martin
wolf_roma wrote:
> 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.
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: [Teneo+hibernate] [message #605189 is a reply to message #81676] |
Wed, 02 May 2007 08:53 |
Roman Bliznets Messages: 75 Registered: July 2009 |
Member |
|
|
Ok, I set Log4j in debug mode;
First problem:
It solved if I manual add attribute: scale="0";
Second Problem:
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>
<property name="repairStatus" lazy="false" insert="true" update="true"
not-null="false" unique="false" type="java.lang.String">
<column not-null="false" unique="false" name="`repairstatus`"
length="2"/>
</property>
from log:
5157 [main] DEBUG org.hibernate.tool.hbm2ddl.SchemaUpdate - create table
`documentbasetype` (e_id bigint not null auto_increment, `dtype`
varchar(255) not null, e_version integer not null, `prdocumentname`
varchar(250), `prdocumentnumber` varchar(50), `prdocumentdate` varchar(255),
`complationauthoritydate` varchar(255), `linenumber` numeric(2,0),
`sublinenumber` varchar(2), `documentmodecode` varchar(4), `informationcode`
varchar(2), `perioddate` varchar(255), `conditiondate` varchar(255),
`saledate` varchar(255), `presentingdate` varchar(255), `goodsstatus`
varchar(1), `repairstatus` bit, `documentbeginactionsdat` varchar(255),
`documentendactionsdate` varchar(255), `organizationname` varchar(150),
`presentinglackingdate` varchar(255), `presenteddocumentmodecode`
varchar(4), `actnumber` varchar(50), `actdate` varchar(255),
`privelegedocumentmodecode` varchar(2), `excisemarkingmodecodetype`
varchar(1), `customspaymentmodecodetyp` varchar(2), `symbolsublinenumber`
varchar(1), `supplystatus` varchar(2), `exportdate` varchar(255),
`esadoutpresenteddocume_id` bigint, `esadoutpresenteddocum_idx` integer,
`esadcontractlisttype_a_id` bigint, `esadcontractlisttype__idx` integer,
econtainer_class varchar(255), e_container varchar(255),
e_container_featureid integer, primary key (e_id))
`goodsstatus` varchar(1) - should be varchar(2)
`repairstatus` bit - it big wrong :), should be varchar(2)
Another fields right;
May be I have to use definite Hibernate?
Can I take Teneo mapping and use it without Teneo? (How to do?)
Should I post in Hibernate.org about the bug?
you wrote:
> Hi,
> It seems that the problem is in Hibernate. Possibly the mapping logic of
> Teneo can be adapted to give hibernate the right hints.
> Can you try with log4j set to debugging? Then you can see how hibernate
> creates the tables in the beginning, maybe this gives some more
> information.
>
> You can manually change the mapping and see what works for you. If you
> post the updated mapping then I can see how to adapt the mapping logic.
>
> gr. Martin
>
|
|
|
Re: [Teneo+hibernate] [message #605191 is a reply to message #81690] |
Wed, 02 May 2007 09:05 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
The repairstatus is even more strange, is there by accident another eclass which also has a
repairstatus which is of another type (boolean)?
You can use the hbm in combination with Teneo. In this case Teneo will not do any automatic mapping
but will use the hbm file. See the option: PersistenceOptions.USE_MAPPING_FILE, here:
http://www.elver.org/hibernate/options.html
I would upgrade to the latest version of hibernate. Although I would surprised if that is the issue
here.
Can you try a join table mapping strategy? See the option:
PersistenceOptions.INHERITANCE_MAPPING
gr. Martin
wolf_roma wrote:
> Ok, I set Log4j in debug mode;
> First problem:
> It solved if I manual add attribute: scale="0";
>
> Second Problem:
> 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>
> <property name="repairStatus" lazy="false" insert="true" update="true"
> not-null="false" unique="false" type="java.lang.String">
> <column not-null="false" unique="false" name="`repairstatus`"
> length="2"/>
> </property>
>
> from log:
> 5157 [main] DEBUG org.hibernate.tool.hbm2ddl.SchemaUpdate - create table
> `documentbasetype` (e_id bigint not null auto_increment, `dtype`
> varchar(255) not null, e_version integer not null, `prdocumentname`
> varchar(250), `prdocumentnumber` varchar(50), `prdocumentdate` varchar(255),
> `complationauthoritydate` varchar(255), `linenumber` numeric(2,0),
> `sublinenumber` varchar(2), `documentmodecode` varchar(4), `informationcode`
> varchar(2), `perioddate` varchar(255), `conditiondate` varchar(255),
> `saledate` varchar(255), `presentingdate` varchar(255), `goodsstatus`
> varchar(1), `repairstatus` bit, `documentbeginactionsdat` varchar(255),
> `documentendactionsdate` varchar(255), `organizationname` varchar(150),
> `presentinglackingdate` varchar(255), `presenteddocumentmodecode`
> varchar(4), `actnumber` varchar(50), `actdate` varchar(255),
> `privelegedocumentmodecode` varchar(2), `excisemarkingmodecodetype`
> varchar(1), `customspaymentmodecodetyp` varchar(2), `symbolsublinenumber`
> varchar(1), `supplystatus` varchar(2), `exportdate` varchar(255),
> `esadoutpresenteddocume_id` bigint, `esadoutpresenteddocum_idx` integer,
> `esadcontractlisttype_a_id` bigint, `esadcontractlisttype__idx` integer,
> econtainer_class varchar(255), e_container varchar(255),
> e_container_featureid integer, primary key (e_id))
>
> `goodsstatus` varchar(1) - should be varchar(2)
> `repairstatus` bit - it big wrong :), should be varchar(2)
> Another fields right;
>
> May be I have to use definite Hibernate?
> Can I take Teneo mapping and use it without Teneo? (How to do?)
> Should I post in Hibernate.org about the bug?
>
> you wrote:
>> Hi,
>> It seems that the problem is in Hibernate. Possibly the mapping logic of
>> Teneo can be adapted to give hibernate the right hints.
>> Can you try with log4j set to debugging? Then you can see how hibernate
>> creates the tables in the beginning, maybe this gives some more
>> information.
>>
>> You can manually change the mapping and see what works for you. If you
>> post the updated mapping then I can see how to adapt the mapping logic.
>>
>> gr. Martin
>>
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: [Teneo+hibernate] [message #605203 is a reply to message #81705] |
Wed, 02 May 2007 15:06 |
Roman Bliznets Messages: 75 Registered: July 2009 |
Member |
|
|
I'm try to use PersistenceOptions.INHERITANCE_MAPPING and it solve my
problem with columnb types; (Same parent class has two children class with
identical filednames.)
I have another problem:
Hibernate: insert into goodsDescription (`processinggoodstype_go_id`,
`processinggoodstype_g_idx`, elt) values (?, ?, ?)
10781 [main] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error:
1364, SQLState: HY000
10781 [main] ERROR org.hibernate.util.JDBCExceptionReporter - Field
'goodsitembasetype_good_id' doesn't have a default value
List of varchar(250) (goodsDescription) is used in some comlex types;
In sql:
create table goodsDescription (
`goodsitembasetype_good_id` bigint not null,
elt varchar(255),
`goodsitembasetype_goo_idx` integer not null,
`goodsbasetype_goodsdes_id` bigint not null,
`goodsbasetype_goodsde_idx` integer not null,
`goodsgroupdescriptiont_id` bigint not null,
`goodsgroupdescription_idx` integer not null,
`processinggoodstype_go_id` bigint not null,
`processinggoodstype_g_idx` integer not null,
primary key (`processinggoodstype_go_id`,
`processinggoodstype_g_idx`)
)
What me to do?
Most probably that this is Hibernate mistake, but
I don't understand how fix it...
May be i send you my project?
|
|
|
Re: [Teneo+hibernate] [message #605206 is a reply to message #81766] |
Wed, 02 May 2007 15:15 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Can you just send me the ecore and the hbm files? This should be enough for me to look at.
gr. Martin
wolf_roma wrote:
> I'm try to use PersistenceOptions.INHERITANCE_MAPPING and it solve my
> problem with columnb types; (Same parent class has two children class with
> identical filednames.)
>
> I have another problem:
> Hibernate: insert into goodsDescription (`processinggoodstype_go_id`,
> `processinggoodstype_g_idx`, elt) values (?, ?, ?)
> 10781 [main] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error:
> 1364, SQLState: HY000
> 10781 [main] ERROR org.hibernate.util.JDBCExceptionReporter - Field
> 'goodsitembasetype_good_id' doesn't have a default value
>
> List of varchar(250) (goodsDescription) is used in some comlex types;
>
> In sql:
> create table goodsDescription (
> `goodsitembasetype_good_id` bigint not null,
> elt varchar(255),
> `goodsitembasetype_goo_idx` integer not null,
> `goodsbasetype_goodsdes_id` bigint not null,
> `goodsbasetype_goodsde_idx` integer not null,
> `goodsgroupdescriptiont_id` bigint not null,
> `goodsgroupdescription_idx` integer not null,
> `processinggoodstype_go_id` bigint not null,
> `processinggoodstype_g_idx` integer not null,
> primary key (`processinggoodstype_go_id`,
> `processinggoodstype_g_idx`)
> )
>
>
> What me to do?
> Most probably that this is Hibernate mistake, but
> I don't understand how fix it...
>
> May be i send you my project?
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
| | | | | |
Goto Forum:
Current Time: Fri Apr 19 04:56:43 GMT 2024
Powered by FUDForum. Page generated in 0.03999 seconds
|