-->
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: Query on component with a collection
PostPosted: Tue Jul 27, 2004 3:43 pm 
Regular
Regular

Joined: Mon Apr 19, 2004 6:54 pm
Posts: 79
I have a mapping that looks like that:

Code:
<class name="eg.Parent">
  <id name="id" column="ParentId" type="long">
      <generator class="native"/>
  </id>
  <component class="eg.Child" name="child">
   <property name="name" column="child_name"/>
   <set name="addrs" table="ADDR" lazy="true">
       <key column="parent_id" />
       <many-to-many class="eg.Addr"/>
   </set>
  </component>
</class>



Then when I do such a query (I only want the component part):

Code:
select parent.child from eg.Parent parent 
join parent.child.addrs addr where (addr.name in ( 'name1'))


The query seems to works (the 'where' part) but the returned Child objects doesn't contains the addrs collection.

Christophe


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.