[dna-issues] [JBoss JIRA] Updated: (DNA-369) Nodes Can Be Saved Without Mandatory Properties or Child Nodes Present

Brian Carothers (JIRA) jira-events at lists.jboss.org
Tue Apr 21 17:45:34 EDT 2009


     [ https://jira.jboss.org/jira/browse/DNA-369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Carothers updated DNA-369:
--------------------------------

    Attachment: DNA-369.patch


Attached a patch that conservatively checks all child nodes and properties of changed nodes before they are saved.  The approach is conservative in that is does not consider the dna:nodeDefinition property on the node in case the definition for the node has been modified.  Although the API does not currently allow modification of existing node types, this is a planned feature and a requirement for JCR 2.0 implementation.  This patch does not eliminate the race condition between adding a child item based on a definition that is being modified, but it does reduce the window of time in which that error can occur.

The patch also adds a save-time check that all mandatory properties and nodes are populated.  This is a requirement of the specification.

Finally, the patch adds some node types and configuration properties to the JR TCK to enable a few of the tests that depend on very specific properties to pass.

Apologies for the patch including a few gibberish lines of the Session.move patch in SessionCache.save.

> Nodes Can Be Saved Without Mandatory Properties or Child Nodes Present
> ----------------------------------------------------------------------
>
>                 Key: DNA-369
>                 URL: https://jira.jboss.org/jira/browse/DNA-369
>             Project: DNA
>          Issue Type: Bug
>            Reporter: Brian Carothers
>         Attachments: DNA-369.patch
>
>
> Item.save() (or Session.save()) should throw a ConstraintViolationException if any of the items to be saved is missing a mandatory property or child node (per section 7.1.1.6 and SessionTest.testSaveConstraintViolationException in the JR TCK tests)

-- 
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