Skip to content
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

Fix for critical DB error with postgres backend #232

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mmnelemane
Copy link

Fixes: #231

The commit updates the tree_model in migration to use lazy_load (http://docs.sqlalchemy.org/en/latest/orm/loading_relationships.html#lazy-loading) which emits a SELECT statement instead of the Joined Eager Loading (http://docs.sqlalchemy.org/en/latest/orm/loading_relationships.html#joined-eager-loading ) which emits a LEFT OUTER JOIN by default on the SELECT statement causing the postgres backend to produce the error.

@ivar-lazzaro
Copy link
Contributor

Could subquery be used instead to keep the same eager loading semantics?

@mmnelemane
Copy link
Author

@ivar-lazzaro : Thanks for this suggestion. "subquery" also seems to work fine in this case.

@mmnelemane
Copy link
Author

@ivar-lazzaro : Do you have any other suggestion. Can we merge this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants