Project

General

Profile

Actions

Bug #72201

closed

Properties and relations are not assigned after extbase tablemapping

Added by Steffen Göde almost 9 years ago. Updated 5 months ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2015-12-14
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Extbase mapping
Complexity:
Is Regression:
No
Sprint Focus:

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.

Actions #1

Updated by Riccardo De Contardi over 8 years ago

  • Category set to Extbase
Actions #2

Updated by Georg Ringer 5 months ago

  • Status changed from New to Closed

Hey Steffen,

as this is a really old issue and the affected code changed a lot, I am closing this issue during cleaning up forge.

If this issue is still valid for you, please open a new one and reference this one or contact me via slack to discuss it! thanks!

Actions

Also available in: Atom PDF