Bug #37230
Image TypeConverter does not allow to map Image by Identity
Status: | Resolved | Start date: | 2012-05-16 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Adrian Föder | % Done: | 0% |
|
Category: | - | |||
Target version: | - |
Description
I want to remove an Image Entity from another Entity by its Identity.
So i used <f:link.action action="remove" arguments={section:section,image:image}> ...
The resulting URI looks like this: §ion[__identity]=29870197-33ca-43c7-9649-70c3c0f28004&image[__identity]=51e35272-e273-4aa3-8f3f-bdd0932edb23
- Remove Image from a given Section
- @param \My\Name\Domain\Model\Section $section
- @param \TYPO3\Media\Domain\Model\Image $image
- @return void
*/
public function removeImageAction(\My\Name\Domain\Model\Section $section, \TYPO3\Media\Domain\Model\Image $image){
$section->removeImage($image);
$this->persistenceManager->update($section);
$this->redirect('show',NULL,NULL,array('section'=>$section));
}
But the mapping throws the following exception for this removeImageAction:
#1297759968: Exception while property mapping for target type "TYPO3\Media\Domain\Model\Image", at property path "": It is not allowed to map property "__identity". You need to use $propertyMappingConfiguration->allowProperties('__identity') to enable mapping of this property. (More information)
Just for testing i disabled the mathing of the ImageConverter from $targetType = 'TYPO3\Media\Domain\Model\Image';
to $targetType = 'TYPO3\Media\Domain\Model\ImageFoo';
And the mapping works again.
Can somebody explain me the need of this ImageConverter?
Kind regards
Carsten
Related issues
Associated revisions
[BUGFIX] Fix Image TypeConverter
The Image TypeConverter now takes care about a given `title` property
and takes it into account for the mapping; additionally the handling of
mapping persisted Images (i.e. sources with an ``__identity`` property)
works as it used to be for persisted entities.
This is covered by some additional Functional Tests, which have,
besides, been augmented a bit and refactored to an abstract functional
test case for reusable methods.
Change-Id: I83e0953278b0dac42b151b2859606206d7f1cf8f
Fixes: #36959
Fixes: #37230
History
#1 Updated by Adrian Föder about 3 years ago
- Status changed from New to Needs Feedback
- Priority changed from -- undefined -- to Should have
Carsten, is this still recent?
#2 Updated by Carsten Bleicker about 3 years ago
Adrian Föder wrote:
Carsten, is this still recent?
ehm, i don't know :)
stopped working on it since 1 month because of daily business :(
sorry
#3 Updated by Dominique Feyer almost 3 years ago
Any update on this issue ?
#4 Updated by Adrian Föder almost 3 years ago
- Status changed from Needs Feedback to Resolved
Resolved with https://review.typo3.org/#/c/15134/
#5 Updated by Karsten Dambekalns over 2 years ago
- Assigned To set to Adrian Föder