PIM-2923: Fix issue on EntityToIdentifier

| Q                    | A
| -------------------- | ---
| Bug fix?             | Y - PIM-2923
| New feature?         | N
| BC breaks?           | N
| CI currently passes? | Y
| Tests pass?          | Y
| Scenarios pass?      | ORM: 1100 - MongoDB: 101
| Checkstyle issues?*  | N
| PMD issues?**        | N
| Changelog updated?   | Y
| Fixed tickets        | PIM-2923
| Doc PR               |