[TYPO3-mvc] Resolve single table inheritance objects with namespace configuration

Daniel Siepmann daniel.siepmann at typo3.org
Mon Feb 11 18:31:03 CET 2013


As you find out it's a bug in 6.0.1.
But it's fixed in the current trunk

--
Daniel Siepmann
TYPO3 Editorial Team Co-Leader

TYPO3 .... inspiring people to share!
Get involved: typo3.org


On Mon, Feb 11, 2013 at 1:49 PM, Max Rösch <autoexec.bat at gmail.com> wrote:
> Hi there,
>
> it's my first implementation of inheritance with extbase, so maybe this one
> is realy simple.
>
> I used the extension builder to set up the basic extension. There seem to be
> some bugs with namespace, so the configuration wasn't created correctly.
>
> It looks something like this:
>
> VENDORNAME\EbDirectory\Domain\Model\Maschine {
>         subclasses {
>                 Tx_EbDirectory_Car = VENDORNAME\EbDirectory\Domain\Model\Car
>                 Tx_EbDirectory_Motorbike =
> VENDORNAME\EbDirectory\Domain\Model\Motorbike
>         }
> }
> VENDORNAME\EbDirectory\Domain\Model\Car {
>         mapping {
>                 tableName = tx_ebdirectory_domain_model_maschine
>                 recordType = Tx_EbDirectory_Car
>         }
> }
> VENDORNAME\EbDirectory\Domain\Model\Motorbike {
>         mapping {
>                 tableName = tx_ebdirectory_domain_model_maschine
>                 recordType = Tx_EbDirectory_Motorbike
>         }
> }
>
> The extension builder set the names for the recordType accoring to it's
> generated TCA
>
> Backend works nicely.
>
> Now to my problem / question:
>
> I read in some articles and on the list that querying the MaschineRepository
> with i.e. findAll() should give me an QueryResult with both types of
> Maschines. But it seems the lookup process doesn't work. I just get
> VENDORNAME\EbDirectory\Domain\Model\Maschine Objects.
>
> There is another strange behaviour, if I query the Car repository but didn't
> query the Maschine repository before I do get results that are definitly
> type Motorbike, but seem to be casted to Car Object.
>
>
> Anyone have a working configuration with namespaces (aka TYPO3 6.0)
>
> Thanks
>
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc


More information about the TYPO3-project-typo3v4mvc mailing list