We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0011f39 commit 6e7eb0aCopy full SHA for 6e7eb0a
schema/relationship.go
@@ -669,8 +669,9 @@ func (rel *Relationship) ParseConstraint() *Constraint {
669
if r != rel && r.FieldSchema == rel.Schema && len(rel.References) == len(r.References) {
670
matched := true
671
for idx, ref := range r.References {
672
- if !(rel.References[idx].PrimaryKey == ref.PrimaryKey && rel.References[idx].ForeignKey == ref.ForeignKey &&
673
- rel.References[idx].PrimaryValue == ref.PrimaryValue) {
+ if rel.References[idx].PrimaryKey != ref.PrimaryKey ||
+ rel.References[idx].ForeignKey != ref.ForeignKey ||
674
+ rel.References[idx].PrimaryValue != ref.PrimaryValue {
675
matched = false
676
break
677
}
0 commit comments