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: Mapping question
PostPosted: Wed Jun 30, 2004 12:38 pm 
Newbie

Joined: Wed Jun 30, 2004 12:15 pm
Posts: 4
Hi,

What is the recommended way to map the following:

A User can be Approved,Rejected, Pending etc.

It is possible that more status Codes will be added at some stage.

How should I map this?

Can hbm2java be used to do this ?

Thanks

_________________
~Justin


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 01, 2004 2:44 am 
Beginner
Beginner

Joined: Wed Feb 25, 2004 5:54 am
Posts: 30
At least 2 tables:

UserTable

with these properties:
id, name,..., status_id

StatusTable

with at least these properties:
id, description (pending,approved,etc)

Where, id is the key in table StatusTable and a foreign key to UserTable through status_id.


I never used HBM2Java but I think it would work


Top
 Profile  
 
 Post subject: In the end I used a persistance enumerated type
PostPosted: Fri Jul 02, 2004 10:59 am 
Newbie

Joined: Wed Jun 30, 2004 12:15 pm
Posts: 4
seemed to fit the bill



Thanks

_________________
~Justin


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.