BC4J 9034: REACTIVATION OF EMPTY STRING PARAM ('''') IN WHERECLAUSE FAILS
Sitting @ customer, we discovered a strange behaviour, when using expert-mode VO*s, that have binding params.
Consider the following snippet:
// set the second param to an empty String
mDeptView.setWhereClauseParam(1, ""); -> "" is the same as new String ("")
when passivating this VO after executing the query, the snapshot (for the argument in the where-clause, that you filled with an empty String) will look like this:
[CDATA[]
On reactivation time - when using SessionCookie.useApplicationModule(), this will cause a NPE in oracle.jbo.server.ViewObjectImpl.
When you encounter this issue, the easiest thing to resolve it is to use "null" instead of an empty String.
meaning: mDeptView.setWhereClauseParam(1, null);
This will solve the issue, without having a functional decrease!
Having questions? Feedback me on this entry Clemens Utschig
0 Comments:
Post a Comment
<< Home