-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Match has_one direction before deleting rel (#1662)
* Match has_one direction before deleting rel When relationship_corresponding_rel matches on the rel class name, it stops on the first match, ignoring the direction parameter. When target_class represents the to_node, direction is :in. When the relationship is a has_one/has_many between a pair of nodes of the same class, the match could find and return the to_node's :out association first, causing delete_reverse_has_one_relationship() to delete it. Checking the direction first prevents that. * Move shared_examples_for group into loop using it per #1662 (comment) (cherry picked from commit ff2f8a5)
- Loading branch information
1 parent
d7bde6c
commit 4a24ba3
Showing
2 changed files
with
61 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters