-->
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: Unexpected Behavior with inheritances
PostPosted: Fri Jan 16, 2015 4:46 am 
Newbie

Joined: Fri Jan 16, 2015 4:30 am
Posts: 1
Hi,

i have following Problem:
I have 2 Classes, A and B while B is a Subclass of A, but their mapping is completly independent from each other (no Inheritance-Strategy definied). In my opinion hibernate should handle them as 2 different and indipendent entities.

But when I try to query the superclass A:
- session.createQuery("FROM A").list();
hibernate queries both tables and I dont know really why. If set an entity-name (Foo) in the mapping file of A and change the query like this
- session.createQuery("FROM Foo).list();
everything works just fine.
I really dont get this...

Thanks for your help!

Sebastian


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.