Open stueynz opened 8 years ago
How does this behave when someone manually specifies authFetch: false
when getting a model (given that autoFetch
is set to true
in the definition) ?
Also could you please convert spaces to tabs? It will help with alignment issues. I'm tempted to switch the whole projects from tabs -> spaces as it's a constant source of problems, but haven't done it yet..
re: using autoFetch
manually, something's not exactly intuitive. AutoFetch will take place if either of the autoFetch
settings is true
.
Maybe setting autoFetch
to false
manually should override the true
setting in the model definition.
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.