It is great to hear that the new version of Castor will be released soon.
But my program fails to work after I updated and rebuilt the castor from CVS source.
The significant error reports that DataBase.expireCache() method was removed. After
check with Werner, I believe it is better to put a @deprecated doclet rather than kill
it quitely. Anyway, the alternative approach, from Werner, is:
Database(Impl).getCacheManager()
The next one is an exception:
org.exolab.castor.jdo.oql.OQLSyntaxException: An incorrect token type was found near ,
(found COMMA, but expected END_OF_QUERY)
I'm using MySQL as the database, the previous exception was caused by a LIMIT
statement like this:
select t from model.Test t limit $1, $2
(with parameters 0 and 7, in MySQL, $1 is the offset, $2 is the limit)
I found that KEYWORD_OFFSET was introduced to OQL expression while debug my program.
It sounds reasonable, and I agree to change my code to use the OFFSET keyword:
select t from model.Test t limit $1 offset $2
(with parameters 7 and 0)
This time, no exception, but no result either. Have to debug again...
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?
Sean-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user