summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/attributes.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-10-03 23:38:48 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-10-03 23:38:48 +0000
commit6f1eb443a358f41f2dd38bac065b98fad54a67ce (patch)
tree0fff3ed11eadf632d59555a4f4180599275d8fa8 /lib/sqlalchemy/attributes.py
parentbbd7c660560212844de3a92ba077bcec77740b16 (diff)
downloadsqlalchemy-6f1eb443a358f41f2dd38bac065b98fad54a67ce.tar.gz
- "custom list classes" is now implemented via the "collection_class"
keyword argument to relation(). the old way still works but is deprecated [ticket:212]
Diffstat (limited to 'lib/sqlalchemy/attributes.py')
-rw-r--r--lib/sqlalchemy/attributes.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/sqlalchemy/attributes.py b/lib/sqlalchemy/attributes.py
index 46c791bff..7628aa098 100644
--- a/lib/sqlalchemy/attributes.py
+++ b/lib/sqlalchemy/attributes.py
@@ -675,6 +675,7 @@ class AttributeManager(object):
the callable will only be executed if the given 'passive' flag is False.
"""
attr = getattr(obj.__class__, key)
+ print "ATTR IS A", attr, "OBJ IS A", obj
x = attr.get(obj, passive=passive)
if x is InstrumentedAttribute.PASSIVE_NORESULT:
return []
@@ -740,8 +741,10 @@ class AttributeManager(object):
self.__sa_attr_state = {}
return self.__sa_attr_state
class_._state = property(_get_state)
-
- typecallable = getattr(class_, key, None)
+
+ typecallable = kwargs.pop('typecallable', None)
+ if typecallable is None:
+ typecallable = getattr(class_, key, None)
if isinstance(typecallable, InstrumentedAttribute):
typecallable = None
setattr(class_, key, self.create_prop(class_, key, uselist, callable_, typecallable=typecallable, **kwargs))