Issue Feature Rejected

#105188Extbase DataMapper column UID for external database

Maxime DAL FABBRO 10/03/24, 15:05 updated 01/09/25, 20:38

Description

If you want to connect to an external database with Extbase Model you have to configure a table mapping between properties and fieldname (Extbase/Persistence/Classes.php).
But, to be able to use Extbase Model your table must have a UID fieldname because in typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php there is a direct reference to UID string name.
A possible solution would be to use the table mapping to map UID property to another fieldname (see attachment patch sample).

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

Files 1

History 2

  1. Garvin Hicking commented and changed tracker Bug Feature TYPO3 Version 11 Is Regression 0 <span data-processor="relativetime" data-value="2024-10-03T17:21:25+00:00" > 10/03/24, 17:21 </span>

    Thanks for sharing! I believe this could have some more side effects, as the getUid() method is very commonly used and “uid” is really an extbase convention.

    If you want, you could try to contribute this patch (see https://docs.typo3.org/m/typo3/guide-contributionworkflow/main/en-us/ – or use the github PR feature) – that would run your patch through our CI Pipeline, and if tests are created to verify the behavior, this idea could be evaluated some more!

  2. Georg Ringer commented and changed status New Rejected <span data-processor="relativetime" data-value="2025-01-09T20:38:18+00:00" > 01/09/25, 20:38 </span>

    as pointed out by Garvin, this might lead to a lot of other issues.

    if you want to use extbase you need to follow some requirements, having a uid is one of those. otherwise I suggest to skip the mapping and just use direct queries.

    I reject the issue because nothing is planned to be changed here.