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

Switch to private Relations store #12

Open
MGatner opened this issue Dec 30, 2020 · 1 comment
Open

Switch to private Relations store #12

MGatner opened this issue Dec 30, 2020 · 1 comment

Comments

@MGatner
Copy link
Collaborator

MGatner commented Dec 30, 2020

Relations should not be stashed in $attributes because this can create some unintended issues with model methods and casting. Instead they will be moved to a private stash of $relations which is checked before re-loading related items.

This will constitute a breaking change and come with the next major version.

@MGatner
Copy link
Collaborator Author

MGatner commented Jul 4, 2022

Consider using a WeakReference or even a centralized WeakMap to make these more leak-safe.

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

No branches or pull requests

1 participant