[TYPO3-mvc] 1 to many relation

Kay Strobach typo3 at kay-strobach.de
Wed Jan 16 09:44:27 CET 2013


It is an m to n relation. Is possible in flow / extbase i doubt there
was an example in the docs.

I think you need to store e.g. the categorie id's in the product.
Than you can iterate over the products to show all products of a
category. Additionally the product nows all it's categories.

To improve speed it could also be sensefull to just store the
information in the categorie and do it vice versa.

Regards
Kay

Am 15.01.13 14:36, schrieb Federico Bernardin:
> Hi,
> I develop a plugin with 2 entities:
> category and product.
> I need to know what is the category when a product is chosen and I need to know what are products related when one category is chosen.
> The relation is 1 category many products.
> I have created category property into product entity.
> 
> How can access the list of product when I know only category entity?
> Should I create a property to map the relation between category and product in category entity?
> 
> Thanks
> Federico
> 


-- 
http://www.kay-strobach.de - Open Source Rocks

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

Answer was useful - feel free to donate:
  -
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KPM9NAV73VDF2
  - https://flattr.com/profile/kaystrobach



More information about the TYPO3-project-typo3v4mvc mailing list