packages and tying operations to class properties and constructors.
"""
from sqlalchemy import exceptions
+from sqlalchemy import util as sautil
from sqlalchemy.orm.mapper import *
from sqlalchemy.orm import mapper as mapperlib
from sqlalchemy.orm.query import Query
when new mappers are created, they will be assigned to their classes as their primary mapper."""
for mapper in mapper_registry.values():
attribute_manager.reset_class_managed(mapper.class_)
- mapper.class_key.dispose()
if hasattr(mapper.class_, 'c'):
del mapper.class_.c
mapper_registry.clear()
+ sautil.ArgSingleton.instances.clear()
def clear_mapper(m):
"""remove the given mapper from the storage of mappers.
def init(self):
super(LazyLoader, self).init()
(self.lazywhere, self.lazybinds, self.lazyreverse) = self._create_lazy_clause(
- self.parent.local_table,
+ self.parent.mapped_table,
self.mapper.select_table,
self.polymorphic_primaryjoin,
self.polymorphic_secondaryjoin,
binds = {}
reverse = {}
- #print "PARENTTABLE", parenttable, "TARGETTABLE", targettable
+ #print "PARENTTABLE", parenttable, "TARGETTABLE", targettable, "PJ", primaryjoin
def should_bind(targetcol, othercol):
# determine if the given target column is part of the parent table