From: <leg...@at...> - 2005-01-11 15:35:15
|
The following comment has been added to this issue: Author: Eitan Suez Created: Tue, 11 Jan 2005 9:33 AM Body: kai wrote: > If Class A is an implementation of the interface MyInterface: > session.createCriteria(MyInterface.class).list() works fine > session.createCriteria(MyInterface.class).count() fails with : > net.sf.hibernate.MappingException: Unknown entity class: MyInterface.class > session.createCriteria(A.class).count() works fine again > > Is there something missing in the patch? i don't think this has anything to do with this patch. for example: take the criteria api out of the equation and fall back to hql instead: can you perform hql queries based on interfaces?? i don't think so. e.g.: from <interfacename> will surely throw an "Unknown Entity Class" exception. / eitan --------------------------------------------------------------------- View this comment: http://opensource.atlassian.com/projects/hibernate/browse/HB-474?page=comments#action_15534 --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/browse/HB-474 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-474 Summary: adding Criteria.count() method Type: Patch Status: Unassigned Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: Hibernate2 Components: core Versions: 2.1 2.1 rc1 Assignee: Reporter: Chris Nelson Created: Sun, 16 Nov 2003 12:53 PM Updated: Tue, 11 Jan 2005 9:33 AM Description: Adds a count() method to the Criteria class that does a modified query to return the count without returning entire query. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |