We could perhaps log.warn like we do for HQL, but throwing an exception
is not a good idea imo.
-  

Steve Ebersole
Project Lead
http://hibernate.org
st...@hibernate.org

Principal Software Engineer
JBoss, a division of Red Hat
http://jboss.com
http://redhat.com
steve.ebers...@jboss.com
steve.ebers...@redhat.com


On Sat, 2009-02-14 at 09:29 -0800, Kevin Wong wrote:
> Hi all, in using hibernate v31final SessionImpl.list(CriteriaImpl criteria), 
> I had an issue where hibernate would return an empty list when no 
> implementors existed for the entity name(I had mistaken deleted the entity 
> from the hibernation configuration file). The confusion arose in that this 
> was be mistaken for a query that would return no rows. In looking at the 
> code, it appears that the results list is always initialized to an empty list 
> rather than null. Likewise, no exception is thrown if the entity does not 
> exists, whereas when using HQL an org.hibernate.hql.ast.QuerySyntaxException 
> exception would be thrown. Opinions on initializing the results list to null 
> or throwing an exception if the implementators exist for the desired entity?
> 
> Thanks
> Kevin
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev

_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Reply via email to