adding arbitrary join conditons for 1:many as well
This commit is contained in:
parent
e355abe5e3
commit
d69551bd39
@ -372,6 +372,10 @@ func (scope *Scope) GetModelStruct() *ModelStruct {
|
|||||||
polymorphicType.IsForeignKey = true
|
polymorphicType.IsForeignKey = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if arbitraryConditions, _ := field.TagSettingsGet("ARBITRARY_JOIN_CONDITIONS"); arbitraryConditions != "" {
|
||||||
|
relationship.ArbitraryJoinConditions = strings.Split(arbitraryConditions, ",")
|
||||||
|
}
|
||||||
|
|
||||||
// if no foreign keys defined with tag
|
// if no foreign keys defined with tag
|
||||||
if len(foreignKeys) == 0 {
|
if len(foreignKeys) == 0 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user