Closed robertpustulka closed 7 years ago
I think you're right that this would fix #9. I would have thought this would be handled by the parent's has
and get
methods, which check the _properties
here. At any rate, I'll look into them. Maybe bailing early in the _lazyLoad
method would be good (although I'm not totally keen on re-implementing what get
does).
Can you check that your null association was fixed by https://github.com/jeremyharris/cakephp-lazyload/commit/ac052a8ba29283d7c6f33ac8a3b4a01db8276f13? I imagine it would be, because null
is null
after all. If it tries to lazy load even once, it keeps that state so it doesn't try again.
@jeremyharris I've commented the commit
Thanks
Lazy load seems to be stuck in a loop while loading nullable belongsTo associates. I think that lazy loader should check if a property has been already set to null.
For example:
This might fix #9