Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 3.3.3
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
In the current implementation, this code works correctly only if the "something" property is saved as type "String":
Restrictions.eq("@something", Boolean.TRUE)
The result of this code in the xpath expression is "@something = true", which does not work in all cases. If your values are stored as Boolean type, that expression won't work, and you must use the appropriate function, fn:true() or fn:false(), changing the expression in "@something = fn:true()". The "fn:" part can be omitted, but without the "()" results are inconsistent (it seems to work only if you are test that the boolean property exists). Unfortunately, Jackrabbit won't throw an exception in this case.
See paragraph 6.6.4.8 of JSR170 or the following links:
http://www.w3.org/TR/xpath/#section-Boolean-Functions
http://www.xqueryfunctions.com/xq/fn_true.html
Activity
- All
- Comments
- History
- Activity
- Transitions
- Subversion Commits