akeeba / fof

Rapid Application Development framework for Joomla!™ 3 and 4
0 stars 0 forks source link

Relations in JSON #557

Closed Skullbock closed 9 years ago

Skullbock commented 9 years ago

Hi @nikosdion i have found a small issue in the DataViewJson class:

https://github.com/akeeba/fof/blob/development/fof/View/DataView/Json.php#L81

I noticed that you load the items by using getItemsArray() instead of get(). This skips any possible eagerloading set with "with" in the current model, therefore causing a bit of problems in the json lists with relations.

Should i PR a fix for this?

nikosdion commented 9 years ago

Yes, please. That's leftover code from FOF 2 I forgot to refactor...

Skullbock commented 9 years ago

See https://github.com/akeeba/fof/pull/558