mneuhaus/TYPO3.Flow — pull request #104 by mneuhaus-bot (2014-03-26 16:40:36+00:00)
Title: [BUGFIX] Persisting of objects as serialized data not supported (Revision 6)

The Reflection does not add properties to metadata information if
they are not tagged with entity/value object. This makes it f.e.
impossible to store an object as serialized object. Before this patch
any Object (excepted some whitelisted) need at least OneToOne annotation.
To be able to store f.e. UserSettings/BasketItems/Sessions or DTO Objects,
the doctrine Annotation @ORM\Column(type="object") needs to be supported.
This is supported with this patch.

The whitelist from ReflectionService was removed. So any kind of
Object is allowed.

ClassSchema does not get informations about @Flow\Transient properties.
This is also done for @Flow\Inject annotated properties.
Otherwise the Persistence tries to store f.e. an injected ObjectManager.
Maybe this can removed if CGL says:
"Any @Flow\Inject on Entity/ValueObjects also needs a @Flow\Transient"

If an Object has a property wich is an object and f.e. the OneToOne
annotation is missing, an exception is thrown as before.
But this is only thrown if no @ORM\Column(type="object") is set (New behavior).

Working Example:
/**
* @var \Acme\Foo\Bar;
* @ORM\Column(type="object")
*/
protected $bar;

In the example above the doctrine behavior for object types matches and invokes:
\Doctrine\DBAL\Types\ObjectType

Also added some tests for other extended types supported by Doctrine:
\Doctrine\DBAL\Types\Type::SIMPLE_ARRAY;
\Doctrine\DBAL\Types\Type::JSON_ARRAY;
\Doctrine\DBAL\Types\Type::DATETIME;
\Doctrine\DBAL\Types\Type::DATETIMETZ;
\Doctrine\DBAL\Types\Type::DATE;
\Doctrine\DBAL\Types\Type::TIME;

Please Note:
- DATETIMETZ seems to be buggy in Doctrine itself. Doctrine loses DateTimeZone
informations :(
- SIMPLE_ARRAY and JSON_ARRAY of Docrtine itself seems not do allow nullable :(
Maybe we need our own JSON_ARRAY, DATETIMETZ and SIMPLE_ARRAY implementations
to make them stored as NULL.

Change-Id: I6d759cffd9a46cbd789585d92324f58e66d3e9ae
Releases: master
Resolves: #54161
Revision-Id: 6bff1cf616880ef8329f81e58a56c58664291095