Hi,
I am now working on a local project based on Alfresco 4.0.c community version. Everything goes well except deleting function. And the error can be reproduced like below steps:
1)I defined one to many association between type A and type B.
2)I created an A and create many B:s (B1,B2…B10)
3)I associated A with all B:s
4)I could query all associated B:s by using nodeSerivce.getTargetAssocs.
5)I removed B7 and B6
6)I could not get the remaining 8 B:s by using nodeService.getTargetAssocs. An Access Denied exception was thrown.
I know the deleted data will be marked as DELETED but not be removed physically. But what about the associations that hooked to the deleted node?
In above case,the size of returning List<AssociationRef> was 10 instead of 8! But when I tried to get properties of targetNodeRef an Access Denied exception was thrown. I had to add try{}catch{} lines to make sure all remaining LIVE association can be fetched correctly. I even cannot use nodeService.getNodeStatus() to check whether the node is marked as DELETED. Is there has some methods to fetch only LIVE associations?
Thanks in advance.
Best Regards,
Alex