openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mauro Flores <mauro-flo...@procergs.rs.gov.br>
Subject Re: COUNT(t) to COUNT(*)
Date Thu, 17 Dec 2009 18:00:47 GMT


I  had tried it already, Milosz. 
But this overwritten method doesn't seem to be running. I debugged it,
others overwritten methods runs. 



MiƂosz Tylenda wrote:
> 
> Mauro,
> 
> I would start with looking at DBDictionary.toSelectCount method.
> 
> Regards,
> Milosz
> 
> 
>> 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. 
>> 
>> -- 
>> View this message in context:
>> http://n2.nabble.com/COUNT-t-to-COUNT-tp4176827p4176827.html
>> Sent from the OpenJPA Users mailing list archive at Nabble.com.
> 
> 
> 

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

Mime
View raw message