[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - managing nomenclators with Entity Beans

maykellff do-not-reply at jboss.com
Thu Nov 15 13:16:21 EST 2007


Hi all, i have a design question.

I have a table named eyeType with and id and a value fields

eyeType
id : Integer
value : VarChar <assian eye, round eye, large eye, spread eye, ect....>

And i have a Person entity bean that map to table named person, this entity bean have like fields an id, a name, an address, ....., and an eyeType field. At data base level a one to many relationship between the tables eyeType and person is defined.

Now i would like that when i load a Person entity from the data base the field eyeType came with its explicit value not with the id corresponding in the eyeType table.

?How can i do that, there is some EJB3 or Seam or Hibernate anotation trick that i can use?

I hope your cooperation, 
thank you,
Maykell.

 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105162#4105162

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105162



More information about the jboss-user mailing list