AbstractFieldMap doesn't handle entities with string IDs

Affected version
2.0.9

Shinka

Member
I have created an entity Atom, which has a varbinary primary key. In attempting to integrate custom fields behavior into my entity, I encountered an issue where AbstractFieldMap#updateFieldAssociations only accounts for numeric primary keys.

PHP:
$emptyKey = array_search(0, $contentIds);
if ($emptyKey !== false)
{
    unset($contentIds[$emptyKey]);
}
For a workaround, I have added a value of 0 to the beginning of my $contentIds.

For a permanent solution, I don't see why setting array_search to strict mode wouldn't work.

PHP:
$emptyKey = array_search(0, $contentIds, true);
if ($emptyKey !== false)
{
    unset($contentIds[$emptyKey]);
}
 
Top