relationship: better returns for hasPolymorphicRelation
This commit is contained in:
parent
40bf1e6b4f
commit
d918ffbd4a
@ -136,11 +136,7 @@ func hasPolymorphicRelation(tagSettings map[string]string) bool {
|
|||||||
_, hasType := tagSettings["POLYMORPHICTYPE"]
|
_, hasType := tagSettings["POLYMORPHICTYPE"]
|
||||||
_, hasId := tagSettings["POLYMORPHICID"]
|
_, hasId := tagSettings["POLYMORPHICID"]
|
||||||
|
|
||||||
if hasType && hasId {
|
return hasType && hasId
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (schema *Schema) setRelation(relation *Relationship) {
|
func (schema *Schema) setRelation(relation *Relationship) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user