passive='all' misinterpreted

Issue #2013 resolved
Mike Bayer repo owner created an issue
    @testing.resolve_artifact_names
    def test_dont_emit(self):
        mapper(MyOtherClass, myothertable)
        mapper(MyClass, mytable, properties={
            'children': relationship(MyOtherClass,
                                 passive_deletes='all',
                                 cascade="save-update")})
        session = Session()
        mc = MyClass()
        session.add(mc)
        session.commit()
        mc.id

        session.delete(mc)

        # no load for "children" should occur
        self.assert_sql_count(testing.db, session.flush, 1)

patch forthcoming

Comments (2)

  1. Log in to comment