[TYPO3-dev] Mapping foreign tables with different columns structure
Emil Angelov
e.y.angelov at gmail.com
Wed May 18 14:53:37 CEST 2016
Good day!
I have the case where I need to create extension that need to work with some tables that are populated with data by some 3dparty tool. These external tables have relations between them (foreign_keys) and different structure. Because the structure of these external tables is very different from the Typo3 generated ones, I was wondering if I can use extbase ( integrated MVC+ORM) + Fluid, to load, manipulate and output the data, as one would normally do with internal extension tables? And if that isn't possible, then what would you suggest because nevertheless I need to do it with Typo3?
The external tables don't have columns with names like: UID, PID, deleted, hidden, t3ver_*, t3_*, sys_language_uid, l18n_parent, l18n_diffsource and all others specific to Typo3. The structure of external tables is similar to:
ExampleTableA:
Id (PK),
SomeForeignId (Foreign_key),
SomeData (Some_Type)
SomeData1 (Some_Type)
..
It seems that the mapping won't do any good on this one, will it?
Tx_TestExt1_Domain_Model_ExampleModelA {
mapping {
tableName = example_table_a
recordType = Tx_TestExt1_Domain_Model_ExampleModelA
columns {
id.mapOnProperty = uid
SomeForeignId.mapOnProperty = foreignType
SomeData.mapOnProperty = propertyType
}
}
}
Typo3 version is 6.2.22.
Any hints or suggestions would be greatly appreciated.
Thank you in advance!
More information about the TYPO3-dev
mailing list