tattersoftware / codeigniter4-relations

Entity relationships for CodeIgniter 4
MIT License
87 stars 20 forks source link

Switch to private Relations store #12

Open MGatner opened 3 years ago

MGatner commented 3 years ago

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 commented 2 years ago

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