Skip to content

BUGFIX: Add related entities container if serialization code is forced - #3648

Open
kdambekalns wants to merge 1 commit into
neos:9.2from
kdambekalns:bugfix-force-serialization-code-container
Open

kdambekalns wants to merge 1 commit into
neos:9.2from
kdambekalns:bugfix-force-serialization-code-container

Conversation

@kdambekalns

Copy link
Copy Markdown
Member

The proxy builder only adds the related entities container if it can detect an entity relation from the property types. For entities in an untyped array (e.g. array<string, mixed>) it cannot, and serializing such an object throws, asking to set forceSerializationCode in the Proxy annotation - which did not help, because the container was still missing.

With forceSerializationCode set the container is now always added, so persisted entities are serialized as references and restored on wakeup.

Checklist

  • Code follows the PSR-12 coding style
  • Tests have been created, run and adjusted as needed
  • The PR is created against the lowest maintained branch
  • Reviewer - PR Title is brief but complete and starts with FEATURE|TASK|BUGFIX
  • Reviewer - The first section explains the change briefly for change-logs
  • Reviewer - Breaking Changes are marked with !!! and have upgrade-instructions

The proxy builder only adds the related entities container if it can
detect an entity relation from the property types. For entities in an
untyped array (e.g. array<string, mixed>) it cannot, and serializing such
an object throws, asking to set forceSerializationCode in the Proxy
annotation - which did not help, because the container was still missing.

With forceSerializationCode set the container is now always added, so
persisted entities are serialized as references and restored on wakeup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant