I couldn't reproduce the problem in the unit test, but here's the
toString() output of a Criteria object that's cauing problems:

Criteria:: SCARAB_ISSUE.DELETED<=>SCARAB_ISSUE.DELETED=0: 
SCARAB_ISSUE_TEMPLATE_INFO.SCOPE_ID<=>((SCARAB_ISSUE_TEMPLATE_INFO.SCOPE_ID=2
AND SCARAB_ISSUE_TEMPLATE_INFO.APPROVED=TRUE) OR
(SCARAB_TRANSACTION.CREATED_BY=1 AND
SCARAB_ISSUE_TEMPLATE_INFO.SCOPE_ID=1)): 
SCARAB_ISSUE.TYPE_ID<=>SCARAB_ISSUE.TYPE_ID=101: 
SCARAB_ISSUE.MOVED<=>SCARAB_ISSUE.MOVED=0: 
SCARAB_ISSUE.MODULE_ID<=>SCARAB_ISSUE.MODULE_ID=100:
Current Query SQL (may not be complete or applicable): SELECT DISTINCT
 FROM SCARAB_TRANSACTION, SCARAB_ACTIVITY, SCARAB_ISSUE,
SCARAB_ISSUE_TEMPLATE_INFO WHERE
SCARAB_TRANSACTION.TRANSACTION_ID=SCARAB_ACTIVITY.TRANSACTION_ID AND
SCARAB_ISSUE.ISSUE_ID=SCARAB_ACTIVITY.ISSUE_ID AND
SCARAB_ISSUE_TEMPLATE_INFO.ISSUE_ID=SCARAB_ISSUE.ISSUE_ID AND
SCARAB_ISSUE.DELETED=0 AND ((SCARAB_ISSUE_TEMPLATE_INFO.SCOPE_ID=2 AND
SCARAB_ISSUE_TEMPLATE_INFO.APPROVED=TRUE) OR
(SCARAB_TRANSACTION.CREATED_BY=1 AND
SCARAB_ISSUE_TEMPLATE_INFO.SCOPE_ID=1)) AND SCARAB_ISSUE.TYPE_ID=101
AND SCARAB_ISSUE.MOVED=0 AND SCARAB_ISSUE.MODULE_ID=100


Sorry, it's quite an involved one. However, the thing to note is that
SCARAB_ISSUE_TEMPLATE_INFO.APPROVED is *not* a key in the top-level
Criteria object, and yet it's value needs translating from "TRUE" to
"1". The 'correctBooleans()' method only checks whether the Criteria
contains a key of boolean type, so if a boolean criterion is hidden
away in a sub-criterion, then its value is not corrected.

I might be able to come up with a simple test case, but I'll leave it
for a day or two.

Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to