You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm building an animal pedigree management system - animal hasOne(animal) as Sire and hasOne(animal) as Dam; both with autoFetch=true.
If we get an Animal - we'll be returned the appropriate animal instance with the matching sire and dam properties correctly filled in. All three animals will now be in the cache.
If now do an independent get on the Sire or Dam we'll be returned the animal instances from the cache, but their Sire & Dam (the original animal's grandSire and grandDam) properties won't be filled in.
My gut reaction is that so-long as the autoFetchLimit hasn't been reached the retrieve from the cache should be capable of populating the missing association properties. Any opinions?
The text was updated successfully, but these errors were encountered:
'Cache' is actually an identity map.
Whilst it does cache things, it still fetches items from the database even if they are present inside the 'cache'.
I don't recommend using it unless you're absolutely sure you need it.
I'm building an animal pedigree management system - animal hasOne(animal) as Sire and hasOne(animal) as Dam; both with autoFetch=true.
If we get an Animal - we'll be returned the appropriate animal instance with the matching sire and dam properties correctly filled in. All three animals will now be in the cache.
If now do an independent get on the Sire or Dam we'll be returned the animal instances from the cache, but their Sire & Dam (the original animal's grandSire and grandDam) properties won't be filled in.
My gut reaction is that so-long as the autoFetchLimit hasn't been reached the retrieve from the cache should be capable of populating the missing association properties. Any opinions?
The text was updated successfully, but these errors were encountered: