[jboss-user] [JBoss Seam] - Re: How to use EntityManager for SELECT COUNT(1)?
fernando_jmt
do-not-reply at jboss.com
Wed Aug 15 19:43:31 EDT 2007
If you're trying to execute an SQL (not JPA QL), just try with this:
| int rowCnt= (Integer) em.createNativeQuery("SELECT count(1) FROM TableA").getSingleResult();
|
HTH.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4074625#4074625
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4074625
More information about the jboss-user
mailing list