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.  [ 2 posts ] 
Author Message
 Post subject: clé composé dans one-to-many
PostPosted: Fri Mar 31, 2006 7:09 am 
Newbie

Joined: Thu Mar 02, 2006 10:59 am
Posts: 8
Location: Paris
Bonjour, Voic imon probleme
J'ai 2 objets liés par une relation de type one-to-many entre O_1 and O_2 lequels ont pour identifiant des 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
}

J'utilise xdoclet pour genérer mes fichiers de mapping
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"
*           
*/


Ca compile et génére bien mais quand je lance mes tests (show_sql=true)
pour obtenir une liste de O_1 avec chacune une collection de O_2

j'obtiens bien le premier sql qui se lance
Quote:
select ..... from O_1 where ....


mais aucun sql pour récupérer la liste de O_2 pour chaque O_1

Merci de m'aider


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 04, 2006 4:29 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
il faut poster le mapping généré

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.