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.
|
|