Added metadata for loaded relations through 'with_objects'#12
Open
VictorPhilipp wants to merge 1 commit intosiracusa:mainfrom
Open
Added metadata for loaded relations through 'with_objects'#12VictorPhilipp wants to merge 1 commit intosiracusa:mainfrom
VictorPhilipp wants to merge 1 commit intosiracusa:mainfrom
Conversation
…"with_objects" are not being fetched multiple times if they are undefined.
Owner
|
Without tests, I can't tell what behavior you're trying to change. Can you give me an example of the expected and actual behavior using the released version of the code? |
Author
|
Sure, I will do that tomorrow. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relations that are loaded with "with_objects" are not being fetched multiple times from the database if they are undefined. All relations that are passed to the Manager class through the with_objects argument are being remembered in the Object's metadata '__xrdbopriv_loaded_relations'. The Generic method-maker checks for presence of this metadata and skips trying to load the relation again if a relation is marked as loaded.
Note: I did not run all of your tests.