-->
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: Non persistent class with persistent fields
PostPosted: Tue Apr 20, 2010 6:51 am 
Newbie

Joined: Tue Apr 20, 2010 6:42 am
Posts: 2
I have following database design:
A Project has multiple Categories : stored in ProjectCategory table with ProjectId as one column
A Project has multiple Types: stored in ProjectType table with ProjectId as one column
A Project has multiple Locations: stored in ProjectLocation table with ProjectId as one column

The Project will have other properties associated with it in Project table.

Now I want to construct a ProjectCatTypeLoc object which will have List<Category>, List<Type> and List<Location> in it. I use this object to store/retrieve only the project category, type and locations and not the Project properties itself (Which will be done using Project class itself).

This means that I don't have a corresponding table in DB for ProjectCatTypeLoc class.

How can I achieve this using Hibernate? Am I doing something wrong here?


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.