Welcome Guest  |  Register  |  Login
Login Name Password
  Index  | Recent Threads  | Unanswered Threads  | Who's Online  | User List  | Help
  Search  


Quick Go »

No member browsing this thread
Thread Status: Active
Total posts in this thread: 4
Post new Thread
Author
Previous Thread This topic has been viewed 299 times and has 3 replies Next Thread
Male reilander
Novice
Member's Avatar


Joined: Jul 27, 2007
Post Count: 41
Status: Offline
Reply to this Post  Reply with Quote 
BUG in "startWith()" method

Context: A register with a "name" field and contains a "ABCDEF" value

This work:
name.toLowerCase().startsWith('ABC') // ok

This do not work:
name.toLowerCase().startsWith('A') // occour a scalar exception

And this work:
name.toLowerCase().startsWith(\"A\") // ok

And this work too:
name.toLowerCase().indexOf('A') == 0 // ok


BUG: Query with startsWith() method using a single quote and a just one character.
----------------------------------------
+----------------------+
| Reinaldo - Brazil |
+----------------------+
[Aug 19, 2008 10:14:10 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Male erik
Expert
Member's Avatar

Belgium
Joined: Mar 12, 2004
Post Count: 3033
Status: Offline
Reply to this Post  Reply with Quote 
Re: BUG in "startWith()" method

Whats the error?
----------------------------------------
Erik Bengtson


[Aug 19, 2008 10:17:31 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Male reilander
Novice
Member's Avatar


Joined: Jul 27, 2007
Post Count: 41
Status: Offline
Reply to this Post  Reply with Quote 
Re: BUG in "startWith()" method

Exception in thread "main" org.jpox.store.expression.ScalarExpression$MethodInvocationException: Exception occurred invoking method startsWith(Ch aracterLiteral "?") at org.jpox.store.expression.ScalarExpression.callMethod(ScalarExpression.java:777) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compilePrimary(JDOQLQuery.java:1906) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileUnaryExpressionNotPlusMinus(JDOQLQuery.java:1760) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileUnaryExpression(JDOQLQuery.java:1741) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileMultiplicativeExpression(JDOQLQuery.java:1694) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileAdditiveExpression(JDOQLQuery.java:1671) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileRelationalExpression(JDOQLQuery.java:1631) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileEqualityExpression(JDOQLQuery.java:1603) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileAndExpression(JDOQLQuery.java:1591) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileExclusiveOrExpression(JDOQLQuery.java:1579) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileInclusiveOrExpression(JDOQLQuery.java:1567) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileConditionalAndExpression(JDOQLQuery.java:1555) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileConditionalOrExpression(JDOQLQuery.java:1537) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileExpression(JDOQLQuery.java:1514) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileExpressionFromString(JDOQLQuery.java:1475) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileFilter(JDOQLQuery.java:1314) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.performCompile(JDOQLQuery.java:924) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.executionCompile(JDOQLQuery.java:897) at org.jpox.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQuery.java:497) at org.jpox.store.query.Query.executeWithMap(Query.java:959) at org.jpox.store.query.Query.executeWithArray(Query.java:932) at org.jpox.store.query.Query.execute(Query.java:855) at com.total.dincash.main.EcfTest.main(EcfTest.java:86) NestedThrowablesStackTrace: org.jpox.store.expression.ScalarExpression$IllegalArgumentTypeException: Illegal argument type: CharacterLiteral "?" at org.jpox.store.expression.StringExpression.startsWithMethod(StringExpression.java:478) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.jpox.store.expression.ScalarExpression.callMethod(ScalarExpression.java:740) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compilePrimary(JDOQLQuery.java:1906) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileUnaryExpressionNotPlusMinus(JDOQLQuery.java:1760) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileUnaryExpression(JDOQLQuery.java:1741) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileMultiplicativeExpression(JDOQLQuery.java:1694) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileAdditiveExpression(JDOQLQuery.java:1671) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileRelationalExpression(JDOQLQuery.java:1631) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileEqualityExpression(JDOQLQuery.java:1603) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileAndExpression(JDOQLQuery.java:1591) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileExclusiveOrExpression(JDOQLQuery.java:1579) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileInclusiveOrExpression(JDOQLQuery.java:1567) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileConditionalAndExpression(JDOQLQuery.java:1555) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileConditionalOrExpression(JDOQLQuery.java:1537) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileExpression(JDOQLQuery.java:1514) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileExpressionFromString(JDOQLQuery.java:1475) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileFilter(JDOQLQuery.java:1314) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.performCompile(JDOQLQuery.java:924) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.executionCompile(JDOQLQuery.java:897) at org.jpox.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQuery.java:497) at org.jpox.store.query.Query.executeWithMap(Query.java:959) at org.jpox.store.query.Query.executeWithArray(Query.java:932) at org.jpox.store.query.Query.execute(Query.java:855) at com.total.dincash.main.EcfTest.main(EcfTest.java:86)

----------------------------------------
+----------------------+
| Reinaldo - Brazil |
+----------------------+
[Aug 19, 2008 10:39:10 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Male reilander
Novice
Member's Avatar


Joined: Jul 27, 2007
Post Count: 41
Status: Offline
Reply to this Post  Reply with Quote 
Re: BUG in "startWith()" method

It's really a bug?
----------------------------------------
+----------------------+
| Reinaldo - Brazil |
+----------------------+
[Aug 20, 2008 3:52:24 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Show Printable Version of Thread  Post new Thread