I have a simple requirement. Let me put thru an example :
class Team {
EntityId entityId;
String name;
}
class EntityId {
long idValue;
}
Now, what I want in the mapping file is that it should take long id of EntityId as primary key. As in my current system , we have been using EntityId object for primary key. Otherwise right now, to keep my existing code uneffected , I have to keep an additional field for long id and then I use this Id for Hibernate work and my code uses existing Entityid code.
<id class=EntityId property=idValue
Something like this...
|