This content has been marked as final.
Show 3 replies
-
1. Re: Select count(*) on table with no rows
dornus Nov 9, 2005 11:28 AM (in response to dornus)The error I receive is:
WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: S0022 ERROR [JDBCExceptionReporter] Column 'myPrimaryKey' not found.
-
2. Re: Select count(*) on table with no rows
dornus Nov 9, 2005 11:52 AM (in response to dornus)
In case you're wondering why I added the MyClass.class part....
If I take the MyClass.class part out I get a NOT YET IMPLEMENTED error. -
3. Re: Select count(*) on table with no rows
dornus Nov 9, 2005 11:57 AM (in response to dornus)I got it w/o using the native query.
final Query q = em.createQuery( "select count(o) " + "from MyTable o " + "where o.myColumn = :col " );
I'm just wondering how to get a similar result with nativeQuerying.