[TYPO3-english] how to call repository to another controller
    Jigal van Hemert 
    jigal.van.hemert at typo3.org
       
    Sat Feb 20 22:46:28 CET 2016
    
    
  
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
    
    
More information about the TYPO3-english
mailing list