-->
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.  [ 2 posts ] 
Author Message
 Post subject: persisting two classes into the same table
PostPosted: Tue Feb 26, 2008 1:46 pm 
Newbie

Joined: Tue Feb 26, 2008 1:26 pm
Posts: 6
Hi, I'm new to Hibernate, so I would be very thankful if you could help me. I would like to know if I can store objects of two different classes into the same table.
For example:
I have two classes Operation and State. Class Operation has a property state which is unique for each Operation object, so I decided to store the properties of the State class in the Operations table.Is this possible with hibernate and how do I have to do the mapping for the State class?


Hibernate version:3.2

Name and version of the database you are using:DB2


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 26, 2008 2:57 pm 
Senior
Senior

Joined: Fri Jun 01, 2007 12:41 pm
Posts: 121
user component mapping for Operations.State. refer to http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd for component syntax.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

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.