-->
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: Criteria#list returning no objects for non-mapped classes.
PostPosted: Wed Aug 30, 2006 6:47 am 
Newbie

Joined: Mon Jun 19, 2006 5:35 am
Posts: 14
Hi,

from time to time I get screwed because I create a criteria for a class which is not persistable at all (= not mapped in hibernate configuration file).

The criteria creation works fine and Criteria#list just returns silently an empty list.

Example: java.lang.Integer not mapped ...

Criteria crit = session.createCriteria(Integer.class);
crit.list();

will work without exception (returning an empty list).

Is that the intended behaviour ? At least the javadoc for SessonImpl and CriteriaImpl do not seem to indicate this.

To me it seems that searching for persisted instances of a class which has not been mapped at all is an error in the application logic.


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.