duplicate extensions, such as backref populators,
from being inserted into the list.
[ticket:1585]
-
- - Fixed the call to get_committed_value() on CompositeProperty.
- [ticket:1504]
- sql
- Fixed the "numeric" paramstyle, which apparently is the
if polymorphic_on is not None:
discriminator = row[polymorphic_on]
- if discriminator is not None or None in polymorphic_instances:
+ if discriminator is not None:
_instance = polymorphic_instances[discriminator]
if _instance:
return _instance(row, result)
return self.get_col_value(column, obj)
def getcommitted(self, state, column, passive=False):
- # TODO: no coverage here
- obj = state.get_impl(self.key).get_committed_value(state, state.dict, passive=passive)
+ obj = state.get_impl(self.key).get_committed_value(state, passive=passive)
return self.get_col_value(column, obj)
def setattr(self, state, value, column):
assert d1.type is False
sess.expunge_all()
assert sess.query(Ding).one() is not None
-
- def test_none_on_sub(self):
- class Ding(object):pass
- class Bat(Ding):pass
- mapper(Ding, t1, polymorphic_on=t1.c.type, polymorphic_identity=False)
- mapper(Bat, inherits=Ding, polymorphic_identity=True)
- sess = create_session()
- d1 = Ding()
- sess.add(d1)
- sess.flush()
- assert d1.type is False
- sess.expunge_all()
- assert sess.query(Ding).one() is not None
class PolymorphicSynonymTest(_base.MappedTest):
@classmethod