summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/properties.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/orm/properties.py')
-rw-r--r--lib/sqlalchemy/orm/properties.py14
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/sqlalchemy/orm/properties.py b/lib/sqlalchemy/orm/properties.py
index 4b6770861..80d101b78 100644
--- a/lib/sqlalchemy/orm/properties.py
+++ b/lib/sqlalchemy/orm/properties.py
@@ -391,22 +391,14 @@ class RelationshipProperty(StrategizedProperty):
self.comparator_factory = comparator_factory or RelationshipProperty.Comparator
self.comparator = self.comparator_factory(self, None)
util.set_creation_order(self)
-
+
if strategy_class:
self.strategy_class = strategy_class
- elif self.lazy == 'dynamic':
+ elif self.lazy== 'dynamic':
from sqlalchemy.orm import dynamic
self.strategy_class = dynamic.DynaLoader
- elif self.lazy is False or self.lazy == 'joined':
- self.strategy_class = strategies.EagerLoader
- elif self.lazy is None or self.lazy == 'noload':
- self.strategy_class = strategies.NoLoader
- elif self.lazy is False or self.lazy == 'select':
- self.strategy_class = strategies.LazyLoader
- elif self.lazy == 'subquery':
- self.strategy_class = strategies.SubqueryLoader
else:
- self.strategy_class = strategies.LazyLoader
+ self.strategy_class = strategies.factory(self.lazy)
self._reverse_property = set()