-->
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.  [ 1 post ] 
Author Message
 Post subject: Id Mapping
PostPosted: Thu Feb 24, 2005 10:52 am 
Newbie

Joined: Thu Feb 24, 2005 8:01 am
Posts: 3
I'd like to use hibernate without changing current code (inherited from an old project !) :
I have 3 classes :

public class DBObject{ // not associated to a database table
protected Oid oid;
//......
}

public class Patient extends DBObject{ associated to table'PATIENT'
//......
}

public class Oid{ // not associated to a database table

public Oid(String highLow) {
//.....
}
}


My problem is with the oid field : in the old configuration it was used as an identifier of the patient object and was saved as a string to PATIENT.ID column. What would be the best way to configure the Patient.hbm.xml since the DBOBject class is not mapped to a db table!

Thank u


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

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.