jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [jira] Created: (JCR-10) save() might create new transient properties
Date Fri, 15 Oct 2004 15:01:51 GMT
Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JCR-10

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JCR-10
    Summary: save() might create new transient properties
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Jackrabbit

   Assignee: 
   Reporter: Felix Meschberger

    Created: Fri, 15 Oct 2004 8:01 AM
    Updated: Fri, 15 Oct 2004 8:01 AM
Environment: Jackrabbit SVN revision 54847

Description:
It seems that when a new node is saved through the parent node, new properties might get created,
which are not saved. To persist those properties the new node must be saved again.

Example:

(Consider a mixin type "extVer" extending the standard type mix:versionable.)

      Node node = parent.addNode("newNode", "nt:base");
      node.addMixin("extVer");
      // "mix:versionable" properties do not exist here
      
      // save the new node
      parent.save();

      // now "mix:versionable" properties like "jcr:isCheckedOut"
      // exist in the "node" but:
      //    node.getProperty("jcr:isCheckedOut").isNew() == true
      // fix:
      node.save();

If the last node.save() opertation would not be done, a RepositoryException would result if
a node.checkIn() would be done immediately after parent.save().

This seems counterintuitive and seems like an error. I wonder whether the properties should
not be added upon "node.addMixin" ? At least "parent.save()" should (or might I say must ?)
not only add the properties but also save them.


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message