-->
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.  [ 3 posts ] 
Author Message
 Post subject: Enumerated type in separate table?
PostPosted: Thu Mar 10, 2005 3:30 pm 
Newbie

Joined: Thu Feb 24, 2005 6:19 am
Posts: 9
Hibernate version: 2.1.7c

Hi,

I'd like to use enumerated types, as explained on p.209 of HIA. The example works for me, but expects to find the value that's converted to a Rating object in the Comments table.

Now I'd like an enumerated type stored in its own table, along with additional columns, like in

Code:
TABLE COMMENT (
   ID INT PRIMARY KEY
   Text VARCHAR,
   Username VARCHAR,
   Rating INT FOREIGN KEY REFERENCES RATING.ID
)

TABLE RATING (
   ID INT PRIMARY KEY
   Description VARCHAR,
   LastUpdate DATE
)


How would I go about mapping this?

Thanks in advance,
Dan


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 10, 2005 6:21 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
This is a question for the regular Hibernate User forum.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 11, 2005 6:14 am 
Newbie

Joined: Thu Feb 24, 2005 6:19 am
Posts: 9
Sorry. I posted it to the regular Hibernate User forum:
http://forum.hibernate.org/viewtopic.php?p=2234082#2234082


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.