-->
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: Transparent Lookup tables mapping
PostPosted: Sun Mar 04, 2007 5:54 am 
Newbie

Joined: Sun Mar 04, 2007 5:19 am
Posts: 8
I'm new at hibernate so this question might be very trivial :)
I don't know how to make the lookup table transparent in my code; I mean if I have a lookup table Status (married, single,...), and there is person table which has an Integer field for status
Person (ID, Name,...,status(foriegn key))

how can in my Person class have status as string instead of an object (of status class) whithout loosing any of the functionalities , like sorting

e.g

class Person {

private int ID;
private String Name;
private String status; // instead of private Status status;
// instead of private int statusID;

}

can any one help?
is there a best practice for this?

Thanks
Hany


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.