-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test that
Translatables
can be used for values beyond strings, e. g…
…. objects (#30) To avoid side effects during Doctrine ORM PHP-value-to-database-value conversion, this PR in part reverts design changes from #28: On the `preFlush` event, remove all `PersistentTranslatable` instances from managed entities and replace them with their plain (primary) values. On `postFlush`, but the `PersistentTranslatable`s back in place. That way, the default (plain) values are in place when the ORM does its change detection. Previously, in fact `PersistentTranslatables` were casted to string when the ORM gathered the values to insert into the database. That does not work when the column type is `object`, since it would try to serialize the `PersistentTranslatable` itself.
- Loading branch information
Showing
4 changed files
with
285 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.