Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Session.get() in
get_instance
instead of Session.query() (#548)
* Use Session.get() in `get_instance` instead of Session.query() Session.get() tries to fetch an object from the session's identity map if it exists, and performs a SQL query otherwise. This can help improve load performance by reducing number of SQL queries, especially for nested relationships, if everything is already available into the session. * Update changelog --------- Co-authored-by: Steven Loria <sloria1@gmail.com>
- Loading branch information
Showing
3 changed files
with
12 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters