Issues

Issue #2091 resolved

cant use non-hashable mapper args with declarative

Mike Bayer
repo owner created an issue

really surprising nobody has reported this. the "column_copies.get(v,v)" line means you can't use exclude_properties, include_properties, anything else list based (well you could pass a tuple). the check there should test for hashable first before doing that check. wacky

Comments (6)

  1. Mike Bayer reporter
    class MyClass(Base):
        __tablename__ = 'foo'
        type = Column(...)
        # ...
    
        __mapper_args__ = {'exclude_properties':['b']('a',), 'polymorphic_on':type}
    

    probably limit the test to "polymorphic_on", "version_id_col" for now, + tests in test/ext/test_declarative.py

  2. Log in to comment