Switch to side-by-side view
--- a/Ming/ming/session.py +++ b/Ming/ming/session.py @@ -4,6 +4,7 @@ class Session(object): _registry = {} + _datastores = {} def __init__(self, bind=None): self.bind = bind @@ -13,7 +14,7 @@ if name in cls._registry: result = cls._registry[name] else: - result = cls._registry[name] = cls() + result = cls._registry[name] = cls(cls._datastores.get(name)) return result def _impl(self, cls):