Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[serializer] document DEEP_OBJECT_TO_POPULATE#11344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
wouterj merged 1 commit intosymfony:masterfromdbu:document-serializer-deep-populate
Apr 7, 2019
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletionscomponents/serializer.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -210,6 +210,20 @@ The serializer can also be used to update an existing object::

This is a common need when working with an ORM.

The ``OBJECT_TO_POPULATE`` is only used for the top level object. If that object
is the root of a tree structure, all child elements that exist in the
normalized data will be re-created with new instances.

..versionadded:: 4.3

Symfony 4.3 introduces a new option ``AbstractObjectNormalizer::DEEP_OBJECT_TO_POPULATE``.
When this flag is set to true, existing children of the root ``OBJECT_TO_POPULATE`` are
updated from the normalized data, instead of the denormalizer re-creating them.

Note that ``DEEP_OBJECT_TO_POPULATE`` only works for single child objects,
but not for arrays of objects. Those will still be replaces when present in
the normalized data.

.. _component-serializer-attributes-groups:

Attributes Groups
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp