You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a non-trivial SQL statement, where basically a 'folio' has a key and is always within an 'application area' and has a specific 'folio subject'. These three variable values (key, application area and folio subject, have simple character values):
select *,in[@class='linked_folio'].out.user_key as user_key from (select flatten(rid.out.in) from index:folios_by_key where key between ? ) where in[@class='parent_application_area'].out.name = ? and out[@class='linked_folio_subject'].in.name = ?
I specify the values for the ? but the query returns this error trace:
Exception in thread "main" com.orientechnologies.orient.core.exception.OCommandExecutionException: Error on execution of command: OSQLQuery [text=select *,in[@class='linked_folio'].out.user_key as user_key from (select flatten(rid.out.in) from index:folios_by_key where key between ? ) where in[@class='parent_application_area'].out.name = ? and out[@class='linked_folio_subject'].in.name = ?]
at com.orientechnologies.orient.core.storage.OStorageEmbedded.executeCommand(OStorageEmbedded.java:102)
at com.orientechnologies.orient.core.storage.OStorageEmbedded.command(OStorageEmbedded.java:83)
at com.orientechnologies.orient.core.sql.query.OSQLQuery.run(OSQLQuery.java:69)
at com.orientechnologies.orient.core.sql.query.OSQLSynchQuery.run(OSQLSynchQuery.java:78)
at com.orientechnologies.orient.core.query.OQueryAbstract.execute(OQueryAbstract.java:32)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.query(ODatabaseRecordAbstract.java:447)
at com.orientechnologies.orient.core.db.ODatabaseRecordWrapperAbstract.query(ODatabaseRecordWrapperAbstract.java:187)
at com.orientechnologies.orient.jdbc.OrientJdbcPreparedStatement.executeQuery(OrientJdbcPreparedStatement.java:73)
at com.pacsol.imageview.core.Test1.main(Test1.java:93)
Caused by: java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
at java.util.ArrayList.rangeCheck(ArrayList.java:571)
at java.util.ArrayList.get(ArrayList.java:349)
at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.bindParameters(OSQLPredicate.java:370)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLResultsetAbstract.assignTarget(OCommandExecutorSQLResultsetAbstract.java:132)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.assignTarget(OCommandExecutorSQLSelect.java:342)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.executeSearch(OCommandExecutorSQLSelect.java:323)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.execute(OCommandExecutorSQLSelect.java:312)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:56)
at com.orientechnologies.orient.core.storage.OStorageEmbedded.executeCommand(OStorageEmbedded.java:94)
... 8 more
It doesn't error if the last two values are hard coded, but does error if either of the last two are ?, except that it does not error if the first value is hard coded and the last two are ?.
I am using the latest snapshot of today: orientdb-1.4.0-20130430.115930-174-distribution.
The text was updated successfully, but these errors were encountered:
I have a non-trivial SQL statement, where basically a 'folio' has a key and is always within an 'application area' and has a specific 'folio subject'. These three variable values (key, application area and folio subject, have simple character values):
select *,in[@class='linked_folio'].out.user_key as user_key from (select flatten(rid.out.in) from index:folios_by_key where key between ? ) where in[@class='parent_application_area'].out.name = ? and out[@class='linked_folio_subject'].in.name = ?
I specify the values for the ? but the query returns this error trace:
Exception in thread "main" com.orientechnologies.orient.core.exception.OCommandExecutionException: Error on execution of command: OSQLQuery [text=select *,in[@class='linked_folio'].out.user_key as user_key from (select flatten(rid.out.in) from index:folios_by_key where key between ? ) where in[@class='parent_application_area'].out.name = ? and out[@class='linked_folio_subject'].in.name = ?]
at com.orientechnologies.orient.core.storage.OStorageEmbedded.executeCommand(OStorageEmbedded.java:102)
at com.orientechnologies.orient.core.storage.OStorageEmbedded.command(OStorageEmbedded.java:83)
at com.orientechnologies.orient.core.sql.query.OSQLQuery.run(OSQLQuery.java:69)
at com.orientechnologies.orient.core.sql.query.OSQLSynchQuery.run(OSQLSynchQuery.java:78)
at com.orientechnologies.orient.core.query.OQueryAbstract.execute(OQueryAbstract.java:32)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.query(ODatabaseRecordAbstract.java:447)
at com.orientechnologies.orient.core.db.ODatabaseRecordWrapperAbstract.query(ODatabaseRecordWrapperAbstract.java:187)
at com.orientechnologies.orient.jdbc.OrientJdbcPreparedStatement.executeQuery(OrientJdbcPreparedStatement.java:73)
at com.pacsol.imageview.core.Test1.main(Test1.java:93)
Caused by: java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
at java.util.ArrayList.rangeCheck(ArrayList.java:571)
at java.util.ArrayList.get(ArrayList.java:349)
at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.bindParameters(OSQLPredicate.java:370)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLResultsetAbstract.assignTarget(OCommandExecutorSQLResultsetAbstract.java:132)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.assignTarget(OCommandExecutorSQLSelect.java:342)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.executeSearch(OCommandExecutorSQLSelect.java:323)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.execute(OCommandExecutorSQLSelect.java:312)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:56)
at com.orientechnologies.orient.core.storage.OStorageEmbedded.executeCommand(OStorageEmbedded.java:94)
... 8 more
It doesn't error if the last two values are hard coded, but does error if either of the last two are ?, except that it does not error if the first value is hard coded and the last two are ?.
I am using the latest snapshot of today: orientdb-1.4.0-20130430.115930-174-distribution.
The text was updated successfully, but these errors were encountered: