diff --git a/source/java/org/alfresco/repo/domain/hibernate/Node.hbm.xml b/source/java/org/alfresco/repo/domain/hibernate/Node.hbm.xml
index c969c6fe31..51e8fb8fc6 100644
--- a/source/java/org/alfresco/repo/domain/hibernate/Node.hbm.xml
+++ b/source/java/org/alfresco/repo/domain/hibernate/Node.hbm.xml
@@ -156,7 +156,6 @@
unique="false"
not-null="false" />
-
@@ -297,7 +296,19 @@
where
status.key.protocol = :storeProtocol and
status.key.identifier = :storeIdentifier and
- status.deleted = :deleted and
+ status.node.id is not null and
+ status.changeTxnId = :changeTxnId
+
+
+
+ select
+ status
+ from
+ org.alfresco.repo.domain.hibernate.NodeStatusImpl as status
+ where
+ status.key.protocol = :storeProtocol and
+ status.key.identifier = :storeIdentifier and
+ status.node.id is null and
status.changeTxnId = :changeTxnId
diff --git a/source/java/org/alfresco/repo/domain/hibernate/NodeStatusImpl.java b/source/java/org/alfresco/repo/domain/hibernate/NodeStatusImpl.java
index 9b52b249af..77ea062ebb 100644
--- a/source/java/org/alfresco/repo/domain/hibernate/NodeStatusImpl.java
+++ b/source/java/org/alfresco/repo/domain/hibernate/NodeStatusImpl.java
@@ -99,13 +99,4 @@ public class NodeStatusImpl implements NodeStatus, Serializable
{
return (node == null);
}
-
- /**
- * For Hibernate use
- */
- @SuppressWarnings("unused")
- private void setDeleted(boolean deleted)
- {
- // this is a convenience, derived property
- }
}
diff --git a/source/java/org/alfresco/repo/node/index/FullIndexRecoveryComponent.java b/source/java/org/alfresco/repo/node/index/FullIndexRecoveryComponent.java
index 41ec62b5e5..3000634953 100644
--- a/source/java/org/alfresco/repo/node/index/FullIndexRecoveryComponent.java
+++ b/source/java/org/alfresco/repo/node/index/FullIndexRecoveryComponent.java
@@ -80,6 +80,7 @@ public class FullIndexRecoveryComponent extends HibernateDaoSupport implements I
{
public static final String QUERY_GET_NEXT_CHANGE_TXN_IDS = "node.GetNextChangeTxnIds";
public static final String QUERY_GET_CHANGED_NODE_STATUSES = "node.GetChangedNodeStatuses";
+ public static final String QUERY_GET_DELETED_NODE_STATUSES = "node.GetDeletedNodeStatuses";
public static final String QUERY_GET_CHANGED_NODE_STATUSES_COUNT = "node.GetChangedNodeStatusesCount";
private static final String START_TXN_ID = "000";
@@ -705,8 +706,7 @@ public class FullIndexRecoveryComponent extends HibernateDaoSupport implements I
public Object doInHibernate(Session session)
{
Query query = session.getNamedQuery(QUERY_GET_CHANGED_NODE_STATUSES_COUNT);
- query.setBoolean("deleted", false)
- .setString("storeProtocol", storeRef.getProtocol())
+ query.setString("storeProtocol", storeRef.getProtocol())
.setString("storeIdentifier", storeRef.getIdentifier())
.setString("changeTxnId", changeTxnId)
.setReadOnly(true);
@@ -726,8 +726,7 @@ public class FullIndexRecoveryComponent extends HibernateDaoSupport implements I
public Object doInHibernate(Session session)
{
Query query = session.getNamedQuery(QUERY_GET_CHANGED_NODE_STATUSES);
- query.setBoolean("deleted", false)
- .setString("storeProtocol", storeRef.getProtocol())
+ query.setString("storeProtocol", storeRef.getProtocol())
.setString("storeIdentifier", storeRef.getIdentifier())
.setString("changeTxnId", changeTxnId)
.setReadOnly(true);
@@ -746,9 +745,8 @@ public class FullIndexRecoveryComponent extends HibernateDaoSupport implements I
{
public Object doInHibernate(Session session)
{
- Query query = session.getNamedQuery(QUERY_GET_CHANGED_NODE_STATUSES);
- query.setBoolean("deleted", true)
- .setString("storeProtocol", storeRef.getProtocol())
+ Query query = session.getNamedQuery(QUERY_GET_DELETED_NODE_STATUSES);
+ query.setString("storeProtocol", storeRef.getProtocol())
.setString("storeIdentifier", storeRef.getIdentifier())
.setString("changeTxnId", changeTxnId)
.setReadOnly(true);