Skip to content

Instantly share code, notes, and snippets.

@dator-zz
Created January 9, 2012 13:23
Show Gist options
  • Save dator-zz/1582913 to your computer and use it in GitHub Desktop.
Save dator-zz/1582913 to your computer and use it in GitHub Desktop.
3 tables: Product, Category, ProductCategory
A product has many categories and a category can belong to many products.
The category objet is nestedset(via doctrine behavior) with a parent, and a position.
I need to be able to manage these categories (up/down/delete/new/edit)
I need to be able to add many categories to a product.
AFAIK, when a category (cat1) has a parent (cat0), and you want to add cat1 to a product, you need to add cat0 too.
Is there a simple way to handle these recommandation?
Thanks a lot ^â
@dator-zz
Copy link
Author

dator-zz commented Jan 9, 2012

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment