-->
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.  [ 1 post ] 
Author Message
 Post subject: problem of mapping with composite id
PostPosted: Fri Oct 31, 2003 7:28 am 
Newbie

Joined: Fri Oct 31, 2003 6:27 am
Posts: 6
hello,

i have two table :

Table1 : ptl_point_livraison

column a pk, fk
column b pk
column c fk
column d
column e


Table2
column a pk
column c pk
column g


********mapping table1 : Classe PointLivraison

<!-- Cle primaire -->
<composite-id name="ptlPK" class="PointLivraisonPK">
<key-property column="a" name="replique" />
<key-property column="b" name="codePtl" />
</composite-id>
<!-- Champs simples -->
<property column="c" name="codeScl" />
<property column="d" name="codeExpSrc" />
<property column="e" name="codePtlLingerie" />

<many-to-one name="serviceClient" class="ServiceClient" insert="false" update="false">
<column name="a"/>
<column name="c"/>
</many-to-one>

*******mapping table2 : Classe ServiceClient

<composite-id name="sclPK" class="ServiceClientPK">
<key-property name="replique" column="a" />
<key-property name="codeScl" column="c" />
</composite-id>
<property name="liblScl" column="g" />



when i load table1 : i have duplicate column 'a' in sql query :

select pointliv0_.a as a, pointliv0_.b as b, pointliv0_.c as c, pointliv0_.d as d , pointliv0_.e as e, pointliv0_.a as a from ptl_point_livraison pointliv0_ where (......

and is not supported by sybase


how to modify my code for avoid this.

thank you.



Ps : d


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

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.