-->
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.  [ 2 posts ] 
Author Message
 Post subject: Usage of Id
PostPosted: Tue Apr 20, 2004 7:56 am 
Beginner
Beginner

Joined: Tue Feb 17, 2004 7:53 am
Posts: 24
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...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 20, 2004 9:59 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Never tryed that with ids but you should be able to solve that using a custom UserType

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

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.