Hi,

On 20/02/2016 11:55, dilip mdl wrote:
I have two controllers and two models (category and products), i wanted
to call products respository in category controller to get products. But
its giving me empty array even it has products of particular category.

I'd personally try to let the model do the work for me. A bidirectional relationship [1] would make it easy to access the categories from a product and the products from a category (it would be nice to make the products property in the category lazy loading; that way the products would only be fetched if you actually use them).

[1] http://lbrmedia.net/codebase/Eintrag/extbase-bidirektionale-mm-relation/

--
Jigal van Hemert
TYPO3 CMS Active Contributor

TYPO3 .... inspiring people to share!
Get involved: typo3.org
_______________________________________________
TYPO3-english mailing list
[email protected]
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

Reply via email to