Project

General

Profile

Actions

Feature #100796

closed

Hook required because dynamic domain properties rendered not-persistable due to new design of Backend.php - method "insertObject"

Added by Oliver Kleinecke over 1 year ago. Updated 4 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2023-05-03
Due date:
% Done:

0%

Estimated time:
PHP Version:
8.2
Tags:
Backend
Complexity:
no-brainer
Sprint Focus:
Needs Decision

Description

Hello everyone,

unfortunately, this "bug" is a bit hard to describe for me, please don`t mind my longer explanation.
I am using "dynamic" domain model object properties. These are properties, which are not hard-coded in the domain-model file itself, but those properties are added to the tca using override-files, which fetch db-records from a repository, and those are then parsed to add the tca columns.
In the domain-object itself, those properties are handled using overloaded getters&setters handling these properties according to the tca settings. So far, this worked nicely, up until now (v10/v11), where the \TYPO3\CMS\Extbase\Persistence\Generic\Backend - method "insertObject" was redesigned.
The current way, it does not check the existence of dynamic properties and those values therefore do not get mapped during db persistence.
I could verify this, by adding an XClass and overriding the function, adding some code, that, if the object (which is to be persisted) is of a certain type or namespace, it does additional mapping using tca columns.

As I am absolutely aware, this is a "special case" of my development and "general" modification of this type is not necessary for most users, therefore I am not asking for a general modification. But, I have different extensions with that very same problem and I would love to keep them "independent" from one another - so overwriting Backend by an XClass is also not a perfect solution for me in this case.

Could there maybe be a new hook added to \TYPO3\CMS\Extbase\Persistence\Generic\Backend - method "insertObject", right after the foreach-loop("foreach($methodNames as $key => $value)") in lines 111-113?
This would enable people like me to override persistence much better in such specific cases, but would not actually have a massive impact otherwise.

Thanks a lot in advance !!!
best regards, Oliver

Actions

Also available in: Atom PDF