Hello,
> At last! I switched into MySQLQueryExpression and found it rewrites the sql
> as former COMMA format with parameters 7 and 0. Abviously, what I get should
> be an empty resultset.
> I didn't have further thought about this bug. My solution is changing the
> MySQLQueryExpression.getStatement() method to use OFFSET keyword but COMMA
> (which is exact same as PostgreSQLQueryExpression).
> What I wonder is how can other QueryExpressions set the parameter sequence
> as what they expect, such as HsqlQueryExpression?
This is a know problem of the current CVS version:
Using LIMIT and OFFSET together still requires an database specific order of bind
variables. For Oracle and MySQL you have to "limit $2 offset $1", and for PostgreSQL
you have to use "limit $1 offset $2", if afer that calling: query.bind(LIMIT);
query.bind(OFFSET);
You may also look into the Castor Bugzilla entry 1732 about the Oracle implementation
of LIMIT/OFFSET (http://bugzilla.exolab.org/show_bug.cgi?id=1732)
to read more about this topic.
Regards,
Martin
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user