jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Bocanegra (JIRA)" <j...@apache.org>
Subject [jira] Created: (JCR-1707) Node.setProperty(String, String) might fail unexpectedly for multiple prop. defs
Date Mon, 04 Aug 2008 20:22:46 GMT
Node.setProperty(String, String) might fail unexpectedly for multiple prop. defs
--------------------------------------------------------------------------------

                 Key: JCR-1707
                 URL: https://issues.apache.org/jira/browse/JCR-1707
             Project: Jackrabbit
          Issue Type: Bug
    Affects Versions: core 1.4.5
            Reporter: Tobias Bocanegra


Assume you have a node type defined with 2 property defs with the same name but different
types, eg:

[Test] > nt:base
  - foo (string) mandatory
  - foo (reference) mandatory

when setting this property with: Node.setProperty("foo", "bar") it might throw a "javax.jcr.ValueFormatException:
not a valid UUID format"  
because 'bar' is not valid uuid. imo, a matching property def for the given value should be
used.

otoh, it could also give unexpected results the other way around, e.g. if a uuid is passed
but the string-def is used first. so the string property def should be tried last.

the workaround is of course to specify a property type.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message