-->
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: Set inverse views on one-to-many relationships
PostPosted: Fri Jun 24, 2005 10:32 am 
Newbie

Joined: Sat Jun 11, 2005 5:27 am
Posts: 11
A couple of questions.

Should adding a new child, by creating a child entity, setting the appropriate many-to-one field, and saving it (in a separate session to that which retrieved the parent) automatically update the set view in the parent object? And conversely with deletion. This doesn't seem to be occuring for me.

In a lazy one-to-many field, is there no nice way of counting the children without retrieving them all? For example I'm building a table of companies one column of which shows the number of employees I have on record. If I were doing it in SQL I'd use a COUNT function, hibernate seems to be retrieving a lot of data I probably don't need. (Also, because of the way JTable works I haven't found an alternative to openning a fresh session for every such cell).


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.