[TYPO3-mvc] After introducing "tx_extbase_type" my frontendusers aren't outputted
Jochen Rau
jochen.rau at typoplanet.de
Wed Apr 21 10:43:28 CEST 2010
Hi.
On 21.04.10 10:18, Marco Huber wrote:
> Sorry, my last mail has been send before I could write anything.
No problem ;-)
>> this might work in this case, because you created the type field, but
> i am not sure if this can be the "general" solution to avoid such a
> problem. If a model does not care about the type field, than it
> shouldn't be part of the generated query.
>
>> If it does care and distinguishes between the types, than a ts setting
> or a property in the model should indicate, that the type field has to
> match.
>
> +1 for this.
>
> I had to add a type field (tx_extbase_type) to tt_address (like it is
> described in the single table inheritance threads) and had to set the
> default value to the name of my tt_address model because I don't care
> about different address types in my extension.
It seems to be overhead to add a type field. But think about having
another extension not related to yours using tt_address, too. Then you
have to put your addresses in different sys folders otherwise you get
them all for findAll().
I a "shared" table the model always "cares" about a type field due to
the fact that it has a type (=class). Without a type field as metadata
it is impossible for Extbase to determine the original class at
reconstitution time if several unrelated extensions use a foreignTable =
tt_address.
You can always use an own table for each of your domain objects. In this
case the metadata isn't necessarily stored in a type field but in the
name of the table (as it is the lowercase class name or a mapping).
But I agree that the current solution with the type field isn't really
sufficient. Let's collect some suggestions.
Regards
Jochen
More information about the TYPO3-project-typo3v4mvc
mailing list