[TYPO3-mvc] Respect storage page ignored on object properties
Thomas "Thasmo" Deinhamer
thasmo at gmail.com
Fri May 14 02:27:52 CEST 2010
K, some more information.
I'm not sure but in my case this occurs with objects having a m:n
relation further a 'RELATION_HAS_AND_BELONGS_TO_MANY' relation.
It seems that setting the respect storage page to TRUE on line 357 in
the DataMapper.php has no effect. Futhermore I think the problem is
somewhere located beyond '$query->setSource(...)'.
This is the query where the storage page is NOT respected:
"SELECT tx_hypestore_domain_model_product.* FROM
tx_hypestore_relation_category_product LEFT JOIN
tx_hypestore_domain_model_product ON
tx_hypestore_relation_category_product.uid_local =
tx_hypestore_domain_model_product.uid WHERE
tx_hypestore_relation_category_product.uid_foreign = '1' AND
(tx_hypestore_domain_model_product.type='default' OR
tx_hypestore_domain_model_product.type='apparel' OR
tx_hypestore_domain_model_product.type='book' OR
tx_hypestore_domain_model_product.type='car') ORDER BY
tx_hypestore_relation_category_product.sorting_foreign ASC"
Which means normally something like "AND
tx_hypestore_domain_model_product.pid IN (315, 347)" is added to the
query - but there it's missing.
(But I'm not sure...)
Is there someone who maybe can check this or knows if this is a bug or
how to fix this? I'm not into OOP too much so it seems I'm running in
circles all the time.
Thanks so much,
Thomas
Am 14.05.2010 01:53, schrieb Thomas "Thasmo" Deinhamer:
> Hello folks,
>
> related to the ticket[1] I filed, on which I haven't
> received feedback yet, I'm trying my luck here. ;o)
>
> It seems that properties of domain objects, which are "child objects"
> are fetched ignoring the storage page.
>
> Example:
>
> Sysfolder 1: Categories (=storage page)
> Sysfolder 2: Products
>
> So now if I fetch 1 category from Sysfolder 1 and then access the
> products via $category->getProducts() the products are returned. If I
> try to get those products directly via the repository, it's not
> possible, cause they're not on the storage page.
>
> This behaviour is a problem on multidomain TYPO3 installations where it
> is neccessary to be able to store products of different vendors/shops
> for different shop pages but using global categories.
>
> Now when fetching the categories on a shop page and printing the
> products, all products of all vendors/shops are displayed.
>
> Is there any solution to this? I really appreciate your help!
>
> Thanks a lot,
> Thomas
>
> [1] http://forge.typo3.org/issues/show/7274
More information about the TYPO3-project-typo3v4mvc
mailing list