-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
session.merge() doesn't work for objects that are mapped against multiple tables #236
Labels
Comments
Anonymous wrote: Patch to fix the problem |
Changes by Anonymous:
|
Anonymous wrote: session.merge() test case |
Changes by Anonymous:
|
Michael Bayer (@zzzeek) wrote: patched this in changeset:1702 |
Changes by Michael Bayer (@zzzeek):
|
sqlalchemy-bot
pushed a commit
that referenced
this issue
Jan 18, 2023
Adjustments made to the mypy plugin to accommodate for some potential changes being made for issue #236 sqlalchemy2-stubs when using SQLAlchemy 1.4. These changes are being kept in sync within SQLAlchemy 2.0. The changes are also backwards compatible with older versions of sqlalchemy2-stubs. Fixed crash in mypy plugin which could occur on both 1.4 and 2.0 versions if a decorator for the :func:`_orm.registry.mapped` decorator were used that was referenced in an expression with more than two components (e.g. ``@Backend.mapper_registry.mapped``). This scenario is now ignored; when using the plugin, the decorator expression needs to be two components (i.e. ``@reg.mapped``). References: sqlalchemy/sqlalchemy2-stubs#236 Fixes: #9102 Change-Id: Ieb1bf7bf8184645bcd43253e57f1c267b2640537
sqlalchemy-bot
pushed a commit
that referenced
this issue
Jan 18, 2023
Adjustments made to the mypy plugin to accommodate for some potential changes being made for issue #236 sqlalchemy2-stubs when using SQLAlchemy 1.4. These changes are being kept in sync within SQLAlchemy 2.0. The changes are also backwards compatible with older versions of sqlalchemy2-stubs. Fixed crash in mypy plugin which could occur on both 1.4 and 2.0 versions if a decorator for the :func:`_orm.registry.mapped` decorator were used that was referenced in an expression with more than two components (e.g. ``@Backend.mapper_registry.mapped``). This scenario is now ignored; when using the plugin, the decorator expression needs to be two components (i.e. ``@reg.mapped``). References: sqlalchemy/sqlalchemy2-stubs#236 Fixes: #9102 Change-Id: Ieb1bf7bf8184645bcd43253e57f1c267b2640537 (cherry picked from commit cf64582f61b15716228302f669322d7efa1003c1) (cherry picked from commit 36285760238314f70eed4532ca2c2c0c2d684609)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Migrated issue, originally created by Anonymous
If you have an object that is mapped against more than one table, code like
fails with an error because too many arguments are being passed to the
session.get()
function.Attachments: sqla-merge.diff | merge.py
The text was updated successfully, but these errors were encountered: