Yes, it looks like this is a result of introducing support for
polymorphism. Can you please create a new issue at
http://jira.codehaus.org/browse/CASTOR, and attach relevant files.
Ideally, I'd love you to follow the bug submission guidelines as
available at http://castor.codehaus.org/how-to-submit-a-bug.html.

Thanks
Werner

wg> -----Original Message-----
wg> From: Sean Liang [mailto:[EMAIL PROTECTED] 
wg> Sent: Thursday, September 29, 2005 12:55 PM
wg> To: [email protected]
wg> Subject: [castor-user] CALL SQL doesn't work in 0.9.9
wg> 
wg> SQL statements like this failed to execute after I upgraded 
wg> the Castor from 0.9.7 to 0.9.9:
wg> 
wg> CALL SQL select u.id, u.name, u.email from user u where 
wg> (status != $1) AS model.User
wg> 
wg> It throws an exception:
wg> org.exolab.castor.jdo.PersistenceException: Nested error: 
wg> java.sql.SQLException: Column index out of range.: Column 
wg> index out of range.
wg>  at 
wg> org.exolab.castor.jdo.engine.SQLEngine$SQLQuery.fetchRaw(SQL
wg> Engine.java:2553)
wg>  at 
wg> org.exolab.castor.jdo.engine.SQLEngine$SQLQuery.nextIdentity
wg> (SQLEngine.java:2241)
wg>  at 
wg> org.exolab.castor.persist.QueryResults.nextIdentity(QueryRes
wg> ults.java:174)
wg>  at 
wg> org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.has
wg> More(OQLQueryImpl.java:581)
wg>  at 
wg> org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.has
wg> More(OQLQueryImpl.java:567)
wg> 
wg> Debugging into SQLEngine.loadSingleField, line 2307:
wg>     if (fieldTableName.equalsIgnoreCase(metaTableName)) { 
wg> metaTableName now is "u" (I'm using mysql), but 
wg> fieldTableName is "user", SQLEngine skips it and continues. 
wg> The exception is out after all fields are checked.
wg> 
wg> The statements work well before upgrading. Any idea?
wg> 
wg> Thanks,
wg> Sean
wg> 

-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to