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 not completely sure if this is intended behaviour or not but when using with() on an Entry query to eager-load the relations getFieldValue() returns the query, not the eager-loaded results.
This makes it difficult to get the results of all fields with getFieldValues().
If this is intended, is there a way to get all field values including eager-loaded data, without having to use something like $entry->fields() to fetch the values individually with $entry->{$fieldName}?
Agree that’s a little awkward. The change could have some unexpected behavior though, so I just changed in for Craft 4 rather than the next 3.x release.
Description
I'm not completely sure if this is intended behaviour or not but when using
with()
on an Entry query to eager-load the relationsgetFieldValue()
returns the query, not the eager-loaded results.This makes it difficult to get the results of all fields with
getFieldValues()
.If this is intended, is there a way to get all field values including eager-loaded data, without having to use something like
$entry->fields()
to fetch the values individually with$entry->{$fieldName}
?Steps to reproduce
When running this code
$entry->relatedCategories
and$entry->contentBuilder
return the expected eager-loaded results.However,
$entry->getFieldValues()
will returnAdditional info
The text was updated successfully, but these errors were encountered: