-->
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: Enumerated type in separate table?
PostPosted: Fri Mar 11, 2005 6:12 am 
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,
Dan


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.