Skip to content

Commit

Permalink
fix: set-child-select and set-parent-select commands
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienaury committed Oct 16, 2024
1 parent 29bb418 commit 9096c03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/id/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ func SetChildSelect(relation string, columns []string, storage Storage) *Error {
for i := uint(0); i < id.Relations().Len(); i++ {
rel := id.Relations().Relation(i)
if rel.Name() == relation {
rel = NewIngressRelation(NewRelation(rel.Name(), rel.Parent(), rel.Child()), rel.LookUpParent(), rel.LookUpChild(), rel.WhereParent(), rel.WhereChild(), rel.SelectParent(), rel.SelectChild())
rel = NewIngressRelation(NewRelation(rel.Name(), rel.Parent(), rel.Child()), rel.LookUpParent(), rel.LookUpChild(), rel.WhereParent(), rel.WhereChild(), rel.SelectParent(), columns)
}
relations[i] = rel
}
Expand Down Expand Up @@ -264,7 +264,7 @@ func SetParentSelect(relation string, columns []string, storage Storage) *Error
for i := uint(0); i < id.Relations().Len(); i++ {
rel := id.Relations().Relation(i)
if rel.Name() == relation {
rel = NewIngressRelation(NewRelation(rel.Name(), rel.Parent(), rel.Child()), rel.LookUpParent(), rel.LookUpChild(), rel.WhereParent(), rel.WhereChild(), rel.SelectParent(), rel.SelectChild())
rel = NewIngressRelation(NewRelation(rel.Name(), rel.Parent(), rel.Child()), rel.LookUpParent(), rel.LookUpChild(), rel.WhereParent(), rel.WhereChild(), columns, rel.SelectChild())
}
relations[i] = rel
}
Expand Down

0 comments on commit 9096c03

Please sign in to comment.