2 Replies Latest reply on Oct 3, 2006 6:08 PM by bytor99999

    Can an object be both an @Entity and @Embeddable

      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

      Thanks

      Mark