From: <leg...@at...> - 2005-01-11 13:05:15
|
The following comment has been added to this issue: Author: Kai Pr=C3=BCnte Created: Tue, 11 Jan 2005 7:04 AM Body: Thank you very much for the patch, it works fine and is very useful! However I have got a problem with it. 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.cl= ass session.createCriteria(A.class).count() works fine again Is there something missing in the patch? Another point, makes it sense that count() returns long, but setFirstResult= (int)? Again, thank you for count(). --------------------------------------------------------------------- View this comment: http://opensource.atlassian.com/projects/hibernate/browse/HB-474?page=3Dc= omments#action_15533 --------------------------------------------------------------------- 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:=20 core Versions: 2.1 2.1 rc1 Assignee:=20 Reporter: Chris Nelson Created: Sun, 16 Nov 2003 12:53 PM Updated: Tue, 11 Jan 2005 7:04 AM Description: Adds a count() method to the Criteria class that does a modified query to r= eturn 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 |