Hi
I got this problem when I save a record with has many associations, my table not use standard primary key "id" because I found it like this :(.
I found the problem in src/Listener/JsonApiListener.php, line 219 and 222
$query = $hasManyTable->find() ->select(['id']) ->where([ $entityForeignKey => $primaryResourceId, 'id IN' => $hasManyIds, ]);
I fixed like this
$query = $hasManyTable->find() ->select([$hasManyTable->getPrimaryKey()]) ->where([ $entityForeignKey => $primaryResourceId, $hasManyTable->getPrimaryKey().' IN' => $hasManyIds, ]);
Hi I got this problem when I save a record with has many associations, my table not use standard primary key "id" because I found it like this :(. I found the problem in src/Listener/JsonApiListener.php, line 219 and 222
$query = $hasManyTable->find() ->select(['id']) ->where([ $entityForeignKey => $primaryResourceId, 'id IN' => $hasManyIds, ]);
I fixed like this$query = $hasManyTable->find() ->select([$hasManyTable->getPrimaryKey()]) ->where([ $entityForeignKey => $primaryResourceId, $hasManyTable->getPrimaryKey().' IN' => $hasManyIds, ]);