[exo-jcr-commits] exo-jcr SVN: r3718 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Dec 23 10:00:03 EST 2010


Author: dkuleshov
Date: 2010-12-23 10:00:03 -0500 (Thu, 23 Dec 2010)
New Revision: 3718

Modified:
   jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java
Log:
EXOJCR-1119: added check if parent node is new to avoid extra db querying

Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java	2010-12-23 14:58:14 UTC (rev 3717)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java	2010-12-23 15:00:03 UTC (rev 3718)
@@ -260,6 +260,12 @@
       ItemState state = changesLog.getItemState(parent, name, itemType);
       if (state == null)
       {
+         // 2. Check if the parent node is a new node
+         if (isNew(parent.getIdentifier()))
+         {
+            // The parent node is a new node so we know that the data doesn't exist in the database
+            return null;
+         }
          // 2. Try from txdatamanager
          if (!(skipCheckInPersistence))
          {



More information about the exo-jcr-commits mailing list