With association autoFetch cache may return incomplete instance.#685
With association autoFetch cache may return incomplete instance.#685stueynz wants to merge 11 commits intodresende:masterfrom
Conversation
Has one with zero ID
…l the associations populated
lib/Model.js
Outdated
There was a problem hiding this comment.
Could you please rename this to hasAutoFetchAssociationsLoaded ?
It's a bit long, but more indicative of what it's actually doing.
|
How does this behave when someone manually specifies Also could you please convert spaces to tabs? It will help with alignment issues. |
|
re: using Maybe setting |
…utoFetch' setting from the association definition.
…s more descriptive, if a little long
… functions; particularly for mongodb
…ton for the associative entity needs to include both keys to be sure we get the right set of extra data
Extend UID for Singleton when hasMany relationship has extra data
When cache has instance that has been loaded from auto-fetch, autoFetchLimit means can sometimes have instance in cache with no associations populated.
A subsequent independent get() or find() will return the underpopulated instance from the cache.
Updated the Singleton cache to check all autoFetch associations are populated before re-using object from cache.