-->
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: Grandchild property on Grandparent entity.
PostPosted: Mon Jun 01, 2009 8:10 pm 
Newbie

Joined: Thu May 14, 2009 1:59 pm
Posts: 4
Hello All,

Quick and dirty, this is what I would like to do:

GrandParent is one to many with Parent is one to many with Child.

Child has parent property to Parent table.
Parent has children property mapped to Child table and parent property linked to GrandParent table
GrandParent has children property mapped to Parent table.

All easy so far. Now for the tricky part.

I want to have a grandChildren property on GrandParent, mapped to Child table, containing all children (in Child table) of all children of the GrandParent (from Parent table).

I'm using hibernate within seam, so the property approach is what I'm looking for, I know how to do it with a query (at least I'm fairly certain I can). Is it possible to map a query (native or HSQL) to a property (other than @Formula which apparently is only for primitive values)?

Thanks for the help,
-DS


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.