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
{{ message }}
This repository has been archived by the owner on May 26, 2023. It is now read-only.
When using includes(), methods defined on the included DomainObjects are not accessible. For example:
$foo = \Model\Foo::findById(1)->includes(array('Bar'))->first();
var_dump($foo->Bar); // works
var_dump($foo->Bar->myMethod()); // throws error, method is accessible again when removing includes()
Seems like an undocumented regression. Right now ArrayCache::add() adds $object->toArray(), but it should add the entire $object. Will create PR.
@bjornpost ah, this is what I was thinking about when I mentioned memcached in #130. Like you pointed out, not calling ->toArray will work for a local array cache, but, if using something like memcached you'd either need DomainObjects to be serializable (unfortunately not possible #76), or call toArray and hydrate on read.
I'm not sure it matters right now, because the hypothetical memcached pheasant cache doesn't exist, but that's where my head's at.
When using
includes()
, methods defined on the included DomainObjects are not accessible. For example:Seems like an undocumented regression. Right now
ArrayCache::add()
adds$object->toArray()
, but it should add the entire$object
. Will create PR./cc @Jud
The text was updated successfully, but these errors were encountered: