[FLOW3-general] Storing JSON object
Dominique Feyer
dfeyer at ttree.ch
Fri Feb 10 13:07:42 CET 2012
Christian Müller (Kitsunet) wrote:
> There is also a doctrine mapping type named object which will be
> serialized to the parent:
> http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html#doctrine-mapping-types
>
>
> But I don't know if that would work out with FLOW3, maybe you give it a
> try and report back. If you do that your customFields model should not
> have an entity annotation as it hasn't got its own representation in the
> database.
Yes I try this way, because I need more logic attached to the custom
field (custom fluid template per client, ...), so I need a real object.
An other advantage by using an object is that I can use the validation
of FLOW3 at the form submission.
The problem with the Doctrine document (i read it already), is that I
can found the way in FLOW3 to do:
---
$conn = $em->getConnection();
$conn->getDatabasePlatform()->registerDoctrineTypeMapping('db_mytype',
'mytype');
---
I think that I need to do that in package.php boot method, but I can't
found an instance of entityManager (em).
I just send an other specific question about this point in the mailing
list this morning.
Thanks for your help,
Dominique Feyer
More information about the FLOW3-general
mailing list