Skip to content

Bulk load of relationships for several objects #177

@ods

Description

@ods

Desired API:

session.query(Message).options(bulk_load(Message.author))

Probably we could also set it as default:

class Message(Base):
    author = relationship(User, lazy='bulk')

Or by replacing descriptor: author = bulk_loaded(relationship(…)).

It's possible to hack loaded state of object with sqlalchemy.orm.attributes.set_committed_value(): http://stackoverflow.com/a/5701523/168352

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions