Avoid unnecessary join in eager one-to-many backref

Issue #1495 resolved
Former user created an issue

In my db-setup, there is a lazy one-to-many relationship with a backref that is configured for eager loading (not the relation but the backref!). When I access the child objects of the parent object, the query from sqlalchemy joins back to the parent object (due to eager loading). In this case, the join is unnecessary, since the parent object is already known.

Discussion and test case here: http://groups.google.com/group/sqlalchemy/browse_thread/thread/af0d8725712cea2

Comments (2)

  1. Log in to comment