jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jessi Abrahams <jessi.abrah...@oracle.com>
Subject Node property type constraints violated when setting strings
Date Thu, 01 Nov 2012 21:53:31 GMT
I'm new to this list so I apologize if this question has been asked (I 
tried searching the archives) or if this is not the right place to ask.

I have a custom node type with a definition like this:

[foo:bar] > mix:lastModified, mix:created, nt:base
   - someBooleanProperty (BOOLEAN)

When I create a node of this type and use any of the setProperty methods 
on Node, the repository allows me to set string values (such as "abc") 
for someBooleanProperty even though as far as I understand from the type 
definition, only booleans should be allowed. The repository throws a 
ConstraintViolationException (as I would expect) if I try to to set 
someBooleanProperty to any other incorrect (non-boolean) type - but not 
strings. It seems like properties can always be set to a string, whether 
or not it's allowed by the node type definition. Is this expected? It 
doesn't seem in line with the spec.


View raw message