Hi,
  Added to support COUNT(*) for simple queries with a database dictionary
option.
SVN revision 892947 on trunk. Also see OPENJPA-1440.

  Use as follows:
 <property name="openjpa.jdbc.DBDictionary"
value="useWildCardForCount=true"/>



Mauro Flores wrote:
> 
> The  jpql:  "SELECT count(o) FROM Object o" (A)
> 
> is usually translated to this sql: "SELECT count(t.primarykey) FROM Table
> t" (B)
> 
> I'm working with a legacy database witch jdbc driver doesn't accept this
> format of sql. 
> It works with: "SELECT count(*) FROM Tabelat" (C) 
> 
> Is there a way to make the query C (with count(*)) be generated instead of
> query B? 
> 
> I'm using the default jpa dictionary.  I know that I can extend
> DBDictionary in order to customize this. 
> I had some difficulty trying to do this. 
> 
> Somebody would give some hint? 
> 
> Thanks. Mauro. 
> 
> 


-----
Pinaki 
-- 
View this message in context: 
http://n2.nabble.com/COUNT-t-to-COUNT-tp4176827p4208818.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to