users@glassfish.java.net

Re: How to use COUNT(1) in jpa or toplink essentials...?

From: <glassfish_at_javadesktop.org>
Date: Mon, 08 Oct 2007 13:29:43 PDT

You might need to use a native query for that - the spec only allows the following for the COUNT (see in BNF):
 [i]COUNT ( [DISTINCT ] identification_variable | state_field_path_expression | single_valued_association_path_expression)[/i]

-marina
[Message sent by forum member 'mvatkina' (mvatkina)]

http://forums.java.net/jive/thread.jspa?messageID=238994