-->
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: Accessing collection of Collections
PostPosted: Tue Feb 10, 2009 12:31 pm 
Newbie

Joined: Tue Feb 10, 2009 12:28 pm
Posts: 2
Req.hbm.xml:


<id name="reqId" type="long" column="REQ_ID">
<generator class="sequence">
<param name="sequence">SEQUENCE</param>
</generator>
</id>


<bag name="lines" lazy="false" >
<key column="REQ_ID" not-null="true" />
<one-to-many class="com.Lines" />
</bag>

Lines.hbm.xml


<id name="lineId" type="string" column="LINE">
<generator class="assigned" />
</id>

<property name="reqId" type="long" column="REQ_ID" />

<bag name="comments">
<key column="LINE" />
<one-to-many class="com.Comments"/>
</bag>

Comments.hbm.xml:


Req.java will contain list of lines. and Line.java have list of comments.

While retrieving columns using projections... how can i retrive columns from CMNTS table.

lines.comments.commentId can i use in Projection and can i retrieve the column?

How do define joins in criteria class for CMNTS table?


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.