summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/query.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2023-01-28 14:37:33 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2023-01-28 14:47:32 -0500
commit960f6dcefe24c6894844366ef6fff60fbcf1ccd6 (patch)
treee7e00e7745618e0abff900e8855dfb6203681f26 /lib/sqlalchemy/orm/query.py
parent586df197615d91af56aefc0d5ff94ceac13154eb (diff)
downloadsqlalchemy-960f6dcefe24c6894844366ef6fff60fbcf1ccd6.tar.gz
add __init__ to DeclarativeBase directly
Fixed regression in :class:`.DeclarativeBase` class where the registry's default constructor would not be applied to the base itself, which is different from how the previous :func:`_orm.declarative_base` construct works. This would prevent a mapped class with its own ``__init__()`` method from calling ``super().__init__()`` in order to access the registry's default constructor and automatically populate attributes, instead hitting ``object.__init__()`` which would raise a ``TypeError`` on any arguments. This is a very simple change in code, however explaining it is very complicated. Fixes: #9171 Change-Id: I4baecdf671861a8198d835e286fe19a51ecda126
Diffstat (limited to 'lib/sqlalchemy/orm/query.py')
0 files changed, 0 insertions, 0 deletions