-->
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.  [ 3 posts ] 
Author Message
 Post subject: Table Per Class Mapping
PostPosted: Thu Jan 19, 2012 12:16 pm 
Newbie

Joined: Tue Jan 10, 2012 3:49 am
Posts: 7
Hi,

@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
class Pet{}

class Dog extends Pet

class Cat extends Pet

class Person {

Pet pet;
}

How can i query Person objects who have dogs with criteria api without joining cat table?


Top
 Profile  
 
 Post subject: Re: Table Per Class Mapping
PostPosted: Thu Jan 26, 2012 11:17 am 
Newbie

Joined: Tue Jan 10, 2012 3:49 am
Posts: 7
Isn't it possible?


Top
 Profile  
 
 Post subject: Re: Table Per Class Mapping
PostPosted: Mon Jan 30, 2012 11:38 am 
Newbie

Joined: Mon Jan 30, 2012 9:09 am
Posts: 5
Try with named queries.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.