Hi,
I have a belongstomany relation
$this->belongsToMany(‘Attributes’, [
‘through’ => ‘ArticlesAttributes’,
‘dependant’ => true
]);
$this->hasMany(‘Variations’, [
‘className’ => ‘Articles’,
‘foreignKey’ => ‘parent_id’
]);
$this->belongsTo(‘Parents’, [
‘className’ => ‘Articles’,
‘foreignKey’ => ‘parent_id’
]);
Now when I retrieve the article it will have bound all the relations as expected. With showing the variations as article objects and the attribute objects.
Then after edit and using patchEntity all the relations are still there, but now the Variations attribute objects seem to be not bound correctly anymore and show up as a regular array without the binding to attributes model.
Anyone know why this is happening?