You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by ji...@apache.org on 2004/10/18 15:15:55 UTC

[jira] Closed: (JCR-10) save() might create new transient properties

Message:

   The following issue has been closed.

---------------------------------------------------------------------
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: Closed
   Priority: Major
 Resolution: FIXED

    Project: Jackrabbit

   Assignee: Stefan Guggisberg
   Reporter: Felix Meschberger

    Created: Fri, 15 Oct 2004 8:01 AM
    Updated: Mon, 18 Oct 2004 6:15 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