Skip to content

Add sync_backref param to relationship #5237

@zzzeek

Description

@zzzeek

We have two complaints that the change in #5149 prevents the creation of two bidirectional viewonly relationships using the backref() function. So we will propose new keyword argment viewonly_backref=backref() which explicitly sets up a relationship in the other direction as it does now, except that it doesn't set up the mutation events. viewonly_back_populates will also be added to suit the case where the bidrectionality is set up in separate relationships however we still want the lazy loader to be able to use the many-to-one loader optimization case as well as having the two relationships be introspectable as related.

Metadata

Metadata

Assignees

Labels

fairly easymaybe a little more involved than "easy' but still doable for motivated newcomersormuse casenot really a feature or a bug; can be support for new DB features or user use cases not anticipated

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions