mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.0/Cloud)
88169: Merged V4.2-BUG-FIX (4.2.4) to HEAD-BUG-FIX (5.0/Cloud) 87959: Merged DEV (4.2.4) to V4.2-BUG-FIX (4.2.4) 87891: MNT-12367 : Relaxed mode for mandatory association not possible Added support for relaxed mode of mandatory association target. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@94563 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -125,8 +125,9 @@ public class AssocTargetMultiplicityIntegrityEvent extends AbstractIntegrityEven
|
||||
// get the source multiplicity
|
||||
boolean mandatory = assocDef.isTargetMandatory();
|
||||
boolean allowMany = assocDef.isTargetMany();
|
||||
boolean enforced = assocDef.isTargetMandatoryEnforced();
|
||||
// do we need to check
|
||||
if (!mandatory && allowMany)
|
||||
if (!(mandatory && enforced) && allowMany)
|
||||
{
|
||||
// it is not mandatory and it allows many on both sides of the assoc
|
||||
return;
|
||||
@@ -165,7 +166,7 @@ public class AssocTargetMultiplicityIntegrityEvent extends AbstractIntegrityEven
|
||||
actualSize = targetAssocRefs.size();
|
||||
}
|
||||
|
||||
if ((mandatory && actualSize == 0) || (!allowMany && actualSize > 1))
|
||||
if (((mandatory && enforced) && actualSize == 0) || (!allowMany && actualSize > 1))
|
||||
{
|
||||
if (actualSize == 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user