[FLOW3-general] Diffrent packages with simillar models + Doctrine
Karsten Dambekalns
karsten at typo3.org
Wed Mar 23 18:20:56 CET 2011
Hi.
On 21.03.11 20:09, Marcus 'biesior' Biesioroff wrote:
> I think that best option is manual setting @table attribute for model's
> class to some individual value
That is the manual solution, I would not put that in kickstarted models,
though. We have the Flow3AnnotationDriver that currently creates table
names from the unqualified class name of a model class.
We discussed this problem already, and came up with the following:
* inside a package, colliding names can be solved by use of @table
* inter-package it would suffice to prepend the package key
Given the concept of vendor namespaces, this would work as follows:
F3\Conference\Domain\Model\Post -> conference_post
TYPO3\Blog\Domain\Model\Post -> blog_post
RobertLemke\BirdWatch\Domain\Model\Post -> birdwatch_post
A problem would still be:
RobertLemke\Blog\Domain\Model\Post -> blog_post
But adding the vendor namespace to the table name as well will get us in
trouble with name length restrictions (Oracle, I'm looking at you).
What to do? Is it reasonable to assume one would not use two different
Blog packages at the same time? Might be to migrate from one to the other...
Regards,
Karsten
More information about the FLOW3-general
mailing list