[ https://issues.apache.org/jira/browse/CAY-1568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13036112#comment-13036112 ]
R V V S S V Raju commented on CAY-1568: --------------------------------------- RemoveRelationshipAction->removeDbRelationships() public void removeDbRelationships(DbEntity entity, DbRelationship[] rels) { ProjectController mediator = getProjectController(); for (DbRelationship rel : rels) { if((rel.getTargetEntity())!= null) { rel.getTargetEntity().removeRelationship( rel.getReverseRelationship().getName()); } else { entity.removeRelationship(rel.getName()); RelationshipEvent e = new RelationshipEvent( Application.getFrame(), rel, entity, MapEvent.REMOVE); mediator.fireDbRelationshipEvent(e); } } for (ObjEntity objEnt : mediator.getCurrentDataMap().getObjEntities()) { if (entity.getName().equals(objEnt.getDbEntityName())) { objEnt.clearDbMapping(); for (ObjRelationship rel : objEnt.getRelationships()) { rel.getTargetEntity().removeRelationship( rel.getReverseRelationship().getName()); } RemoveRelationshipAction->removeObjRelationships() public void removeObjRelationships(ObjEntity entity, ObjRelationship[] rels) { ProjectController mediator = getProjectController(); for (ObjRelationship rel : rels) { rel.getTargetEntity().removeRelationship( rel.getReverseRelationship().getName()); entity.removeRelationship(rel.getName()); RelationshipEvent e = new RelationshipEvent( Application.getFrame(), rel, entity, MapEvent.REMOVE); mediator.fireObjRelationshipEvent(e); } } > Reverse relationships should be lost when Removing relationship in dbentity > ----------------------------------------------------------------------------- > > Key: CAY-1568 > URL: https://issues.apache.org/jira/browse/CAY-1568 > Project: Cayenne > Issue Type: Bug > Components: Modeler > Affects Versions: 3.0.1 > Environment: windows7 > Reporter: R V V S S V Raju > Priority: Minor > > 1.Create dbentity1 and dbentity2 in a DataMap. > 2.Create a relationship and reverse-relationship between the two dbentities. > 3.Remove the relationship in dbentity2, the reverse-relationship still exists. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira