Fix an error
This commit is contained in:
parent
a6aff36585
commit
f1edcb8e54
@ -243,7 +243,7 @@ class RelationshipLoader:
|
||||
load_strategy = ( # if it is a one to one or many to one relationship we are loading it with selectinload strategy, else joinedload
|
||||
{"selectinload": [getattr(cls, rel.key)]}
|
||||
if rel.direction.name in ["MANYTOONE", "ONETOMANY"]
|
||||
else {"joinedload": getattr(cls, rel.key)}
|
||||
else {"joinedload": [getattr(cls, rel.key)]}
|
||||
)
|
||||
relationships[rel.key] = load_strategy
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user