-->
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: [SOLVED] HQL abstract superclass query with impl. polym.
PostPosted: Sun Feb 07, 2010 9:34 am 
Newbie

Joined: Sun Feb 07, 2010 8:13 am
Posts: 2
Hello everybody,

I'm new to Hibernate and currently I'm testing various inheritance strategies.

With "table per concrete class with implicit polymorphism" I keep getting an exception "[MyAbstractSuperclass] is not mapped" when performing an HQL query on the abstract superclass.

Do I really have to map that abstract superclass? The book is not very helpful at this point as it advises to implement the subclasses in a normal way because Hibernate "still knows about the superclass". So I included each inherited field in the mapping for the subclasses and hoped it would work.

Please note I'm using Hibernate native mappings with XML files.

Any suggestions appreciated.

Regards,

Thomas


Last edited by thweiss on Tue Feb 09, 2010 11:03 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: HQL abstract superclass query with implicit polymorphism
PostPosted: Tue Feb 09, 2010 11:01 pm 
Newbie

Joined: Sun Feb 07, 2010 8:13 am
Posts: 2
Solved. The HQL query had to use the FQN of the superclass (package-location + classname).


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.