-->
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: Hibernate Criteria seaching on joined-subclass
PostPosted: Thu Jun 30, 2005 1:02 pm 
Newbie

Joined: Fri Aug 13, 2004 11:41 am
Posts: 9
I am currently using Hibernate 3.

Currently I have an Item with a mapped joined-sublcass of Gear. What I would like to do is be able to search by Gear only on a Criteria class. After reviewing the documentation:

http://www.hibernate.org/hib_docs/v3/re ... teria.html

I am unable to see how to correctly create a Criteria object for this. Because the mapped type is Itme, when creating a Gear criteria object Hibernate throws an error about an unknown mapping type.

The criteria object is created with the following:

Criteria criteria = HibernateHelper.getSession().createCriteria(Item.class);

where I want to be able to do:

Criteria criteria = HibernateHelper.getSession().createCriteria(Gear.class);

Any help is great, thanks!


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.