Skip to content

Latest commit

 

History

History
35 lines (31 loc) · 1.09 KB

2021-09-10-fixed-entity-reader-for-non-id-pks.md

File metadata and controls

35 lines (31 loc) · 1.09 KB
title issue
Fixed EntitySearcher for PrimaryKeys other than `id`
NEXT-17105

Core

  • Changed \Shopware\Core\Framework\DataAbstractionLayer\Dbal\EntityDefinitionQueryHelper to fix problem when entities have primary keys, where the storage name and the property name differs.
  • Deprecated reading entities with the storage name of the primary key, use the property name instead.

Upgrade Information

Deprecating reading entities with the storage name of the primary key fields

When you added a custom entity definition with a combined primary key you need to pass the field names when you want to read specific entities. The use of storage names when reading entities is deprecated by now, please use the property names instead. The support of reading entities with the storage name of the primary keys will be removed in 6.5.0.0.

Before

new Criteria([
    [
        'storage_name_of_first_pk' => 1,
        'storage_name_of_second_pk' => 2,
    ],
]);

Now

new Criteria([
    [
        'propertyNameOfFirstPk' => 1,
        'propertyNameOfSecondPk' => 2,
    ],
]);