If I understood your idea correctly, polymorphic behavior might be of
interest to you:

http://bakery.cakephp.org/articles/view/polymorphic-behavior

Hope that helps!

On Oct 24, 1:02 pm, bookme <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am new to CakePHP ..want to implement a Tag functionlity for my
> website.
>
> I have four modal
> 1 Tag
> 2 User
> 3 Brand
> 4 Product
>
> I am thinking to make two tables
> tags : id, tag_name
> entities_tags : tag_id, entity_id, entity_type
>
> here entity is User, Brand, Product and their corresponding ids..
>
> Should I follow this above design or make a different join table for
> each entity like;
>
> tags : id, tag_name
> tags_users : tag_id, user_id
> brands_tags: brand_id, tag_id
> products_tags: product_id, tag_id
>
> please tell me in terms of save, edit, delete, get..which one is best
> design for CakePHP
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to