Bug #47232
Property mapping fails for Account::roles
Status: | Resolved | Start date: | 2013-04-15 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | Philipp Maier | % Done: | 100% |
|
Category: | Property | |||
Target version: | TYPO3 Flow Base Distribution - 2.0 | |||
PHP Version: | 5.4 | Complexity: | easy | |
Has patch: | No | Affected Flow version: | Git master |
Description
Hi,
following error is thrown when the PropertyMapper tries to map the roles.
#1297759968: Exception while property mapping for target type "SomeModel", at property path "accounts.0": Catchable Fatal Error: Argument 1 passed to TYPO3\Flow\Persistence\Doctrine\Proxies\__CG__\TYPO3\Flow\Security\Account::setRoles() must be an array, object given.
This is mainly because the typehint in the function setRoles is <array> while the property itself is annotated as Doctrine Collection.
Changing the typehint to \Doctrine\Common\Collections\Collection seems to fixes this problem.
Associated revisions
[BUGFIX] Property mapper can again map account roles
Due to the type hint in the setter method of roles, the property
mapper was unable to set the converted property.
Change-Id: Ifda60ce0c465b8464d0cc12067228a8ec75bcd8e
Resolves: #47232
Releases: master, 2.0
[BUGFIX] Property mapper can again map account roles
Due to the type hint in the setter method of roles, the property
mapper was unable to set the converted property.
Change-Id: Ifda60ce0c465b8464d0cc12067228a8ec75bcd8e
Resolves: #47232
Releases: master, 2.0
History
#1 Updated by Philipp Maier over 2 years ago
- Assigned To set to Philipp Maier
#2 Updated by Gerrit Code Review over 2 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19996
#3 Updated by Philipp Maier over 2 years ago
For the time being a TypeConverter can be used as a workaround.
#4 Updated by Gerrit Code Review over 2 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19996
#5 Updated by Gerrit Code Review over 2 years ago
Patch set 1 for branch 2.0 has been pushed to the review server.
It is available at https://review.typo3.org/19999
#6 Updated by Philipp Maier over 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 903271f4f4959c8ee279e61dcc894ffd9968e6c7.