Bug #72201
closedProperties and relations are not assigned after extbase tablemapping
0%
Description
Use case:
Model Foo (is aggregate root for other models) was created with Extension Builder. It should be renamed to Bar, and mapped to another table. After introducing a tablemapping via TypoScript the mapped table can be accessed, as the model object is not empty if the repository finds a record (e.g. by uid), but two issues occur:
1. all model properties keep their default values
2. Related objects (objectstorage) stay always null (default value). As they get initialized in the model contructor they should at least be empty storages.
Tablemapping is done in ext_typoscript_setup.txt:
config.tx_extbase.persistence.classes {
Vendor\MyExt\Domain\Model\Bar {
mapping {
tableName = tx_myext_domain_model_foo
}
}
}
Issue 1 can be solved if a column mapping is introduced for each property of the model. But normally columnmappings should only be needed if they differ from extbase naming convention.
...
columns {
name.mapOnProperty = name
...
}
...
If the tablename of the root object and the relational columns in child objects are changed to extbase naming convention everything works fine.