refactor: set cascade_backrefs=False for SavedQuery#42212
Conversation
Code Review Agent Run #e52282Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #42212 +/- ##
==========================================
- Coverage 65.22% 65.21% -0.01%
==========================================
Files 2768 2768
Lines 156280 156280
Branches 35774 35774
==========================================
- Hits 101930 101916 -14
- Misses 52384 52398 +14
Partials 1966 1966
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Looks great. |
hy144328
left a comment
There was a problem hiding this comment.
Accidentally put my review down as a comment. #42212 (comment)
Nevertheless, I think good to go!
da88be6 to
c8ec89e
Compare
|
Thanks for double-checking all the |
Enable the pytest error filter for the "'SavedQuery' object is being merged into a Session along the backref cascade path" RemovedIn20Warning and adopt the SQLAlchemy 2.0 behavior for both SavedQuery backrefs (User.saved_queries and Database.saved_queries). Constructing SavedQuery(database=...) or SavedQuery(user=...) no longer implicitly merges the new object into the parent's session. All persisting code paths already add saved queries explicitly. See discussion #40273. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
c8ec89e to
52d11e3
Compare
Code Review Agent Run #3404c2Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
See #40273
SUMMARY
Enable errors for the
"SavedQuery" object is being merged into a Session along the backref cascade pathRemovedIn20Warning, and adopt the SQLAlchemy 2.0 behavior for both SavedQuery backrefs (User.saved_queriesandDatabase.saved_queries).Constructing
SavedQuery(database=...)orSavedQuery(user=...)no longer implicitly merges the new object into the parent's session. All code paths that persist saved queries already callsession.add()explicitly, so no call sites needed changes.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION
🤖 Generated with Claude Code