[jboss-user] [JBoss Seam] - Can an object be both an @Entity and @Embeddable

bytor99999 do-not-reply at jboss.com
Tue Oct 3 16:25:22 EDT 2006

Basically I have a lookup table that has US States. But in an Address I want to embed the State Code. So that in a ComboBox lists the States and assigns an attribute of the Address to the State object returned. But instead of there being a foreign key to the state record, I want the Code in the Address. Address will actually also be an embeddable object to my Location object. So right now when I add the State to the Address and the Address to the Location object, the database shows the Object in the state column and not a foreign key or the code. I guess if I overrode the toString method it might put in the State Code.

What do you guys think



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

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

More information about the jboss-user mailing list