DbRelationship[] dbRels = getProjectController()
.getCurrentDbRelationships();
if (dbRels != null && dbRels.length > 0) {
if ((dbRels.length == 1 && dialog.shouldDelete(
"DbRelationship", dbRels[0].getName()))
|| (dbRels.length > 1 && dialog
.shouldDelete("selected DbRelationships"))) {
DbEntity entity = mediator.getCurrentDbEntity();
removeDbRelationships(entity, dbRels);
Application.getInstance().getUndoManager().addEdit(
new RemoveRelationshipUndoableEdit(entity, dbRels));