Persisting Traversable DomainObjectInterface broken
Currently objects which implement the
Traversable interface are always persisted as CSV of their values after iterating. This change introduced this change of behavior with TYPO3 7.0.0. This is broken in various ways:
- The type of the relation is ignored which could be e.g.
ColumnMap::RELATION_HAS_ONE, thus multivalue does not make sense.
- If an object implements
DomainObjectInterfaceit must always be persisted using its identifier.
While I'm not sure how to handle the first case the second one should be fixed right away since it breaks persistence of objects which implement both
Traversable as well as
Updated by Mathias Brodala over 4 years ago
Here's a test extension to demonstrate the issue. It contains a model
Main and has one property pointing to a
Related model which implements
IteratorAggregate and a
When running the
typo3/cli_dispatch.phpsh extbase test:persisttraversabledomainobject command, a row is added to each table, but the
related field of
0 instead of the UID of the newly inserted