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've started implementing the sparse fieldsets in my application. At first I was surprised how easy it was to add the functionality to my app. Without included relationships is the result as expected. Problem is that the relationships aren't added if I use sparse fieldsets. These could be accomplished by adding the type name to the fieldsets array.
According to the tests this should be working:
$aFieldSets = [
// Attributes and relationships that should be shown'employees' => ['firstName', 'lastName'],
'subsidiaries' => ['name'],
]
$sJson = $this->getJsonEncoder()
->withLinks($aLinks)
->withMeta($metaData))
->withFieldSets($aFieldSets)
->withIncludedPaths(['subsidiaries'])
->encodeData($oRecords);
Only if the Fieldset is changed to this, the related data is shown.
$aFieldSets = [
// Attributes and relationships that should be shown'employees' => ['firstName', 'lastName','subsidiaries'],
'subsidiaries' => ['name'],
]
Where could be the problem?
The text was updated successfully, but these errors were encountered:
I've started implementing the sparse fieldsets in my application. At first I was surprised how easy it was to add the functionality to my app. Without included relationships is the result as expected. Problem is that the relationships aren't added if I use sparse fieldsets. These could be accomplished by adding the type name to the fieldsets array.
According to the tests this should be working:
Only if the Fieldset is changed to this, the related data is shown.
Where could be the problem?
The text was updated successfully, but these errors were encountered: