diff --git a/org.framed.iorm.ui/modules/relationship/intra_relationship_constraints/AbstractIntraRelationshipConstraintPattern.java b/org.framed.iorm.ui/modules/relationship/intra_relationship_constraints/AbstractIntraRelationshipConstraintPattern.java index 390b7ea247adad6edd9f0b11efde395f873ac057..a3eb07e311fd1d9ca5c1a8faff3dacc0baa06220 100644 --- a/org.framed.iorm.ui/modules/relationship/intra_relationship_constraints/AbstractIntraRelationshipConstraintPattern.java +++ b/org.framed.iorm.ui/modules/relationship/intra_relationship_constraints/AbstractIntraRelationshipConstraintPattern.java @@ -155,10 +155,11 @@ public abstract class AbstractIntraRelationshipConstraintPattern extends FRaMEDS @Override public boolean canCreate(ICreateContext createContext) { Connection targetConnection = createContext.getTargetConnection(); - if(targetConnection != null && - getBusinessObjectForPictogramElement(targetConnection) instanceof Relation) { - Relation relation = (Relation) getBusinessObjectForPictogramElement(targetConnection); - return EditPolicyService.getHandler(this.getDiagram()).canCreate(createContext, this.getModelType()); + if(targetConnection != null) { + Object m = getBusinessObjectForPictogramElement(targetConnection); + if(m instanceof Relation && ((Relation) m).getType() == Type.RELATIONSHIP) { //TODO: Create EditPolicy rule for this case + return EditPolicyService.getHandler(this.getDiagram()).canCreate(createContext, this.getModelType()); + } } return false; }