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.
This pull request adds the support to do nested Parent property writes and closes #47 , like this:
This makes Parent property writes more consistent with other properties.
I also added tests to check for this as how it's supported is a little different from how other nested properties are implememented.
(I also included a fix for mock instances as the .Parent property was not a proxy when reading it, please review.)
I'm not sure the way I added this is the best way but it does work (I'm using the Cache object to store what instance it should be parented to).
This pr also makes Parent property get checked for duplicates at the same depth like other properties (was an easy fix and I'm assuming it's intended anyways, if not tell me and I'll remove this behaviour from the pr.)