property compilation still fails in inheritance relationships

Issue #243 resolved
Mike Bayer repo owner created an issue

testcase in polymorph.py fails, due to the circular nature of the "Person" mapper and "Manager" mapper:

        person_join = polymorphic_union( {
            'engineer':people.join(engineers),
            'manager':people.join(managers),
            'person':people.select(people.c.type=='person'),
            }, None, 'pjoin')


        person_mapper = mapper(Person, people, select_table=person_join, polymorphic_on=person_join.c.type,
                    polymorphic_identity='person', 
                    properties = dict(managers = relation(Manager, lazy=True))
                )

        mapper(Engineer, engineers, inherits=person_mapper, polymorphic_identity='engineer')
        mapper(Manager, managers, inherits=person_mapper, polymorphic_identity='manager')

        #person_mapper.compile()
        class_mapper(Manager).compile()

mapper compilation is completely confusing and barely works; it should not be so difficult to understand, and needs a complete rethink yet again.

Comments (2)

  1. Log in to comment