Skip to content

have InstanceState skip unpicklable and/or unnecessary MapperOptions #1553

Closed
@sqlalchemy-bot

Description

@sqlalchemy-bot
Collaborator

Migrated issue, originally created by Michael Bayer (@zzzeek)

contains_eager() produces an EagerLazyOption as well as a LoadEagerFromAliasOption. contains_eager() is only relevant towards the immediate load and does not need to be sent along within InstanceState.load_options. LoadEagerFromnAliasOption is frequently not pickleable due to the alias, table, and sometimes annotated column objects within.

Every MapperOption should have a flag indicating whether it's appropriate to carry along into the options for a lazyload, and the flag should only be set for the standalone EagerLazyOption specified by lazyload(), eagerload(), as well as the DeferredOption. It should be off for EagerLazyOption sent along by contains_eager() as well as for LoadEagerFromAliasOption.

tests should include direct checks as well as checking for pickle-ability. should likey be within test/orm/test_mapper.py.

Activity

sqlalchemy-bot

sqlalchemy-bot commented on Oct 2, 2009

@sqlalchemy-bot
CollaboratorAuthor

Michael Bayer (@zzzeek) wrote:

6c12838 1bab6f0

sqlalchemy-bot

sqlalchemy-bot commented on Oct 2, 2009

@sqlalchemy-bot
CollaboratorAuthor

Changes by Michael Bayer (@zzzeek):

  • changed status to closed
added
bugSomething isn't working
blockerissue that must be resolved asap as it is preventing things from working
on Nov 27, 2018
added this to the 0.5.7 milestone on Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockerissue that must be resolved asap as it is preventing things from workingbugSomething isn't workingorm

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @sqlalchemy-bot

        Issue actions

          have InstanceState skip unpicklable and/or unnecessary MapperOptions · Issue #1553 · sqlalchemy/sqlalchemy