-->
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: [xDoclet][composite-id]relation one-to-many
PostPosted: Thu Mar 30, 2006 12:25 pm 
Newbie

Joined: Thu Mar 02, 2006 10:59 am
Posts: 8
Location: Paris
Hello, Here is my problem
I have two Objects and a one-to-many relation between O_1 and O_2 which have composite-id
Code:
O_1{
  O_1ID
  other...
}
O_1ID{
  KEY_1
  KEY_2
}
-------------
O_2{
  O_2ID
  other...
}
O_2ID{
  KEY_1
  KEY_2
  KEY_3
}

i use xdoclet to generate hbm.xml
Code:
/*
* @hibernate.set cascade="all" inverse="false" lazy="false"
* @hibernate.collection-one-to-many
*          class="....model.O_2"
* @hibernate.collection-key
* @hibernate.collection-key-column
*          name="KEY_1"
* @hibernate.collection-key-column
*          name="KEY_2"
*           
*/

it compiles and generates fine but when i launch test (show_sql=true)
to get the list of O_1 with theirs O_2

i obtain the first sql to get the list of O_1
Code:
select ..... from O_1 where ....


but no sql is launched to obtains each sublist of O_2


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.