Bugs item #826735, was opened at 2003-10-20 12:47 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=826735&group_id=22866
Category: JBossCMP Group: v3.2 Status: Open Resolution: None Priority: 5 Submitted By: Panagiotis Korros (pkorros) Assigned to: Nobody/Anonymous (nobody) Summary: ejbSelectGeneric returns wrong results Initial Comment: I have a home method in my cmp entity bean public Page ejbHomeGetUsers( int offset, int limit) throws FinderException { long userCount = ((Long) ejbSelectGeneric("SELECT COUNT( o.id ) FROM User o ", new Object[0]) .iterator ().next()).longValue(); Collection users = ejbSelectGeneric( "SELECT OBJECT( o ) FROM User o OFFSET ?1 LIMIT ?2", new Object[] {new Integer(offset),new Integer(limit)}); return new Page(users, userCount, offset); } There is a bug in jboss 3.2.x (confirmed for Jboss 3.2.2RC4 and 3.2.2Final) that causes the second call to ejbSelectGeneric to return a collection of o.id elements instead of User objects. When I changed the code that counts the elements to: long userCount = ((Long) ejbSelectGeneric("SELECT OBJECT( o ) FROM User o ", new Object[0]) .size(); Everything worked ok. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=826735&group_id=22866 ------------------------------------------------------- This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo The Event For Linux Datacenter Solutions & Strategies in The Enterprise Linux in the Boardroom; in the Front Office; & in the Server Room http://www.enterpriselinuxforum.com _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development