Hi,
while working on Critiera i "bumped" into this funny behavior:
Doing the following Critieria on an empty db gives no error:
s.createCriteria(Student.class) .add( Expression.like("name", "Gavin", MatchMode.START) ) .addOrder( Order.asc("name") ) .createCriteria("enrolments", "e") .addOrder( Order.desc("year") ) .addOrder( Order.desc("semester") ) .createCriteria("course") .addOrder( Order.asc("description") ) .setProjection( Expression.projection() .add( Expression.property("this.name") ) .add( Expression.property("e.year") ) .add( Expression.property("e.semester") ) .add( Expression.property("courseCode") ) .add( Expression.property("description") ) ) .uniqueResult();
but when data is available i get an error saying
that courseCode is not available on Student - which is totally correct. (using explicit criteria aliases solves it)
I'm just wondering why this is not discovered when the query gives no result - it should still be able to tell
that courseCode is not on Student - is this expected behavior ?
-- Max Rydahl Andersen callto://max.rydahl.andersen
Hibernate [EMAIL PROTECTED] http://hibernate.org
JBoss Inc [EMAIL PROTECTED] http://jboss.com
------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel