Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

head start needed in designing hibernate application

 
vijay shanker
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi group,

I have just started to learn hibernate.

i have a two classes called User and contact; both classed extends to BaseObjectModel;

I have a id field in the BaseObjectModel class. That "id" i want to use in both subclasses.

What inheritance strategy i should use and how to implement that strategy in the mapping files.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No inheritence strategy.

Just a class that is inheriting the other class to get the parents classes attributes. It has nothing to do with mapping inheritence in this case.

Mark
 
vijay shanker
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark Spritzler wrote:No inheritence strategy.

Just a class that is inheriting the other class to get the parents classes attributes. It has nothing to do with mapping inheritence in this case.

Mark


It is what i am doing but. i get a problem when loading details from data base--- ID, that is in parent class, left null by the returning object. And it gives assertion fail error in hibernate library.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic