fuel / orm

Fuel PHP Framework - Fuel v1.x ORM
http://fuelphp.com/docs/packages/orm/intro.html
151 stars 95 forks source link

fix loading for singular relation's relations #438

Closed ysshir closed 4 years ago

ysshir commented 4 years ago

This PR fix is for 1st problem of #435.

Consistency problem is quite big problem. but I would like to resolve at least this one.

WanWizard commented 4 years ago

This issue should be fixed in https://github.com/fuel/orm/commit/13aa57b09247cfe41d5d781932ff5afb0a529446

ysshir commented 4 years ago

I think it's not fixed yet.

still not fetched in get method.

the problem is Line:1625

if ($target[$parent] instanceOf Model)

there is no Model instance, except the Model is cached and use from_cache. The GrandChild data is stored in $_custom_data, not _data_relations.

and GrandChildren data are loaded lazily.

WanWizard commented 3 years ago

You are right, the dissussion about this issue goes on here: https://github.com/fuel/orm/pull/435