These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: SchemaExport outputs duplicate columns
PostPosted: Tue Sep 26, 2006 6:17 am 
Newbie

Joined: Thu Dec 01, 2005 5:11 am
Posts: 16
Location: Estonia
I have a problem with mappings, created SQL is incorrect.
idea is to get schema from MSSQL to MySQL

Hibernate version:
1.0.2
Mapping documents:

Carrier:

<bag name="CostEquationList" table="Cost_Equation" cascade="all" fetch="join" inverse="true" lazy="false">
<key column="Carrier_Id" />
<one-to-many class="My.Data.CostEquation, My.Data" />
</bag>

CostEquation:

<many-to-one name="CarrierId" column="Carrier_ID" class="My.Data.Carrier, My.Data" />

Now, in SQL schema, I get invalid DDL for CostEquation because Carrier_ID exists there twice. What can I do?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 26, 2006 6:31 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Spell both columns the same way, i.e. either _ID or _Id.


Top
 Profile  
 
 Post subject: Re: SchemaExport outputs duplicate columns
PostPosted: Tue Sep 26, 2006 6:32 am 
Expert
Expert

Joined: Thu Jan 19, 2006 4:29 pm
Posts: 348
deejay wrote:
<bag name="CostEquationList" table="Cost_Equation" cascade="all" fetch="join" inverse="true" lazy="false">
<key column="Carrier_Id" />
<one-to-many class="My.Data.CostEquation, My.Data" />
</bag>

CostEquation:

<many-to-one name="CarrierId" column="Carrier_ID" class="My.Data.Carrier, My.Data" />


Make the case of "Carrier_Id" to be same?

Gert

_________________
If a reply helps You, rate it!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 26, 2006 6:54 am 
Newbie

Joined: Thu Dec 01, 2005 5:11 am
Posts: 16
Location: Estonia
Thank You, this really helped :) spell, spell, spell ...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.