From: Frank S. <fra...@te...> - 2008-08-07 19:59:36
|
I have solved it now by adding my own routines to count. It would be nice if you could change the ERXHelper.rowCountForFetchSpecification There is: int index = statement.toLowerCase().indexOf(" from "); statement = "select count(*) " + statement.substring(index, statement.length()); I have changed this in: int index = statement.toLowerCase().indexOf(" from "); statement = "select count(distinct t0.id) " + statement.substring(index, statement.length()); but that is only a solution for me now. Thanks > The key is to figure out how to rewrite > ERXSQLHelper.rowCountForFetchSpecification in a way that can handle > the distinct ... That method appears to be sort of hacky, so adding a > bit more hackery seems ok. > > On Aug 7, 2008, at 11:39 AM, Frank Stock wrote: > >> Hi All, >> >> I need to use UsesDistinct in my ERXBatchingDisplayGroup. But I see >> that the rowCount does not work with usesDistinct, so the rowCount is >> wrong. >> Is there an easy to solve this. I can see that the fetch uses the >> disitinct and is working fine. >> >> Thanks you for helping, >> Frank Stock >> Belgium |