[dna-issues] [JBoss JIRA] Commented: (DNA-335) DNA's NodeTypeManager implementation does not allow multiple definitions with the same name

Randall Hauch (JIRA) jira-events at lists.jboss.org
Mon Mar 23 22:19:22 EDT 2009


    [ https://jira.jboss.org/jira/browse/DNA-335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12458690#action_12458690 ] 

Randall Hauch commented on DNA-335:
-----------------------------------

Applied the "dna-335-definitionsWithSameName" patch (see attached), albeit with a few smaller changes, including a correction to JcrNodeDefinition.allowsChildWithType(...), and a change to RepositoryNodeTypeManager.findPropertyDefinition(...) to not skip over property definitions that have an undefined property type.

It would be ideal if we add test cases for the RepositoryNodeTypeManager.find* methods, with separate test cases for each expected behavior.  The logic to find the best property definition or child node definition is certainly not trivial, and it would be very very nice to have some thorough specifications.

> DNA's NodeTypeManager implementation does not allow multiple definitions with the same name
> -------------------------------------------------------------------------------------------
>
>                 Key: DNA-335
>                 URL: https://jira.jboss.org/jira/browse/DNA-335
>             Project: DNA
>          Issue Type: Bug
>            Reporter: Randall Hauch
>         Attachments: dna-335-definitionsWithSameName.patch
>
>
> The JCR Specification (version 1.0.1) does not preclude that there may be multiple property definitions with the same name, or that there may be multiple child definitions with the same name.  JCR 1.0 (version 1.0.1) DOES say that there may be multiple residual definitions with the same name.  However, the draft version of the JSR-283 specification does have a new section 4.7.15 that specifically addresses and allows multiple definitions with the same name, as long as they are distinguishable from the other definitions with the same name (for property definitions, this means the type must be different; for child node definitions, this means the required primary types attribute).
> There are a number of places where the logic is expecting a single property definition (or child definition) given a node type and a definition name.  This is obviously flawed.  Also, our logic to select the "best" property definition or "best" child node definition doesn't seem to be correct, in that it tends to favor less-restricted definitions that are lower in the type hierarchy rather than very good matching definitions higher in the type hierarchy.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the dna-issues mailing list