First I'd like to apologize for posting a persistence question on this board. 
I've tried other boards but no one's home. I am desperate :-(

I would like to perform a SELECT COUNT(1) FROM a table "TableA" but can't seem 
to get the SQL statement to work with EntityManager. The following code always 
return a 0 even I know the table contains hundreds of records.

int rowCnt= (Integer) em.createQuery("SELECT count(1) FROM 
TableA").getSingleResult();

Can anyone help?

I am using JBoss 4.2.1 with Seam 1.2.1. Thanks.
-tony

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4074624#4074624

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4074624
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to