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


Reply via email to