Hmm... for those DB's that don't have explicit LIMIT/OFFSET support,
Cayenne should fail over to an in-memory offset/limit processing. So
this is either a bug in Cayenne, or something is misinterpreted.
Marco, can you confirm that the returned list contains 2000 items on
Sybase (vs. Cayenne logging 2000 items in the query in the logs)?
Andrus
On Apr 24, 2009, at 1:01 PM, Aristedes Maniatis wrote:
>
> On 24/04/2009, at 7:00 PM, Marco Gattei wrote:
>
>> Hi everyone,
>>
>> a newbie question .... Is fetchOffset supported on Sybase ?
>>
>> i did some test with cayennne 3 with SelectQuery and fetch
>> offset and running code like this:
>> SelectQuery query = new SelectQuery(MyClass.class,
>> e.expWithParameters(parametri));
>> query.setFetchOffset(10);
>> query.setFetchLimit(10);
>> List<MyClass> list = performQuery(query);
>>
>> on oracle returns only 10 items in the list ....
>> on sybase returns 2000 items !!!!!
>>
>> I'm missing something ?
>
>
> It looks like appendLimitAndOffsetClauses(buffer) is not defined for
> Sybase. If you'd like to implement it, take a look at the
> org.apache.cayenne.dba.oracle.OracleSelectTranslator.java for
> comparison. It should be pretty simple to implement if you know the
> nuance of Sybase SQL. If you do this, please open a Jira task and
> we'll add the code to Cayenne.
>
> Ari
>
>
> -------------------------->
> ish
> http://www.ish.com.au
> Level 1, 30 Wilson Street Newtown 2042 Australia
> phone +61 2 9550 5001 fax +61 2 9550 4001
> GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A
>
>
>
This archive was generated by hypermail 2.0.0 : Fri Apr 24 2009 - 06:24:35 EDT