Part of ALF-10699: Nodes not getting put into new transactions during various operations

- Mass ACL updates of primary children now update the version and transaction for the affected nodes


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31108 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2011-10-11 03:07:30 +00:00
parent 916ef0cc06
commit e2b4f2884d
6 changed files with 63 additions and 10 deletions

View File

@@ -12,7 +12,9 @@
alf_child_assoc assoc
join alf_node child on (child.id = assoc.child_node_id and assoc.is_primary = #{isPrimary})
set
child.acl_id = #{newSharedAclId}
child.acl_id = #{newSharedAclId},
child.version = child.version + 1,
child.transaction_id = #{txnId}
where
assoc.parent_node_id = #{primaryParentNodeId}
and
@@ -21,5 +23,20 @@
<if test="optionalOldSharedAclIdInAdditionToNull != null"> OR child.acl_id = #{optionalOldSharedAclIdInAdditionToNull}</if>
)
</update>
<!--
ANSI subselect is not performant on MySQL. Use non-ANSI join syntax.
-->
<update id="update_ChildrenTxns" parameterType="ChildAssoc">
update
alf_node n
join alf_child_assoc ca on (ca.child_node_id = n.id)
set
n.version = n.version + 1,
n.transaction_id = #{parentNode.transaction.id}
where
ca.parent_node_id = #{parentNode.id}
<if test="isPrimary == true">and ca.is_primary = #{isPrimary}</if>
</update>
</mapper>