-
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
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.
- Loading branch information
1 parent
95f249d
commit 7a6cb2d
Showing
2 changed files
with
65 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