Author: dkuleshov
Date: 2010-12-23 09:58:14 -0500 (Thu, 23 Dec 2010)
New Revision: 3717
Modified:
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java
Log:
JCR-1547: added check if a parent node is new, to avoid extra db querying
Modified:
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java
===================================================================
---
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java 2010-12-23
14:52:06 UTC (rev 3716)
+++
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java 2010-12-23
14:58:14 UTC (rev 3717)
@@ -242,6 +242,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
data = transactionableManager.getItemData(parent, name, itemType);
}
Show replies by date