mySQLClientService.query(sql).then(function(result) {
            if (result.hasResultsetRows) {
                $scope.fatalErrorOccurred("Adding relation failed.");
            } else {
                $("#addRelationDialog").modal("hide");