-->
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: Problem during inheritance: error:could not resolve property
PostPosted: Wed Sep 24, 2008 1:15 am 
Newbie

Joined: Wed Sep 24, 2008 1:06 am
Posts: 1
I was getting some problem in hibernate with inheritance.

Scenario is,

I have superclass object called Stop and a subclass object called DeadHeadStops extending from Stop object. Both are having their own tables to look into and their own .hbm.xml files.

There is no inheritance at hibernate mapping files level or at tables level, but having only inheritance at object level.


Object Table Hbm.xml

Stop STOP Stop.hbm.xml
DeadHeadStops DEADHEAD_STOPS DeadheadStops.hbm.xml
(extending Stop obj)

Now the problem is, when the application initializes both objects, and when I do session.find(“from Stop s where s.id=”+id), it is looking for subobject table (deadhead_stops) and with id column which is not present in sub object table and gives below error.

I am not sure why it is mapping Super class object with subclass object.


Can some body please help me out in this issue.

Thaks in advance,
Satish.G


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.