Property Mapper should be able to map to target if only a setter exists
|Priority:||Should have||Due date:|
|Assignee:||Karsten Dambekalns||% Done:||
|Target version:||TYPO3 Flow Base Distribution - 1.0 alpha 8|
The property mapper checks if it can set a certain property in the target by consulting the Class Schema of the target class. This assumes that a class property of the same name must exist in order to set a property.
However, we use the ObjectAccess API to ultimately set the property which does not require such class property. It could easily be that only a setter method exists which stores the property somewhere else and this should be sufficient to map the property.
Therefore the map function needs to be refactored to use information from ObjectAccess::isPropertySettable / isPropertyGettable instead of relying on the class schema.
|related to TYPO3.Flow - Bug #6005: ObjectAccess::getProperty() behaves not as documented whe...||Resolved||2010-01-13|
[+FEATURE] FLOW3 (Property): The PropertyMapper now only maps to settable properties and no longer relies on the class schema to determine the type for the target property - it uses the setter parameter's type if available and falls back to the class schema if needed. Resolves #5612.
[+FEATURE] FLOW3 (Reflection): When reflecting classes entities and value objects are checked for being declared prototype, resolves #6141.
[+FEATURE] FLOW3 (Reflection): ClassSchema now enforces consistency when it comes to value objects and identity/identifier properties, resolves #6140, resolves #6142.
[+BUGFIX] FLOW3 (Persistence): Fixed left over JCR constant in AbstractSqlBackend, fixes #6153.
Updated by Karsten Dambekalns over 3 years ago
- Status changed from New to Accepted
- Assignee set to Karsten Dambekalns
- Target version set to 1.0 alpha 8