No,
I Tree has unique branches..
A Table for Dining Room , is not a table for a Living Room ....but i
think if you reverse the order you will get more organized
put
Tables( id:5 ) -> Living Room ( id:6 )
Tables( id:5 ) -> Dinning Room ( id:7 )
* ids are only examples
and on the categories_products tables add a record for each product
for example
product: 35 category: 6
product: 35 category: 7
and this way it will belong to both categories
or even if you want, to the parent category
product: 35 category: 5
hasAndBelongsToMany remember !!!!!
Check::
Product Model
public $hasAndBelongsToMany = array('Category');
Category Model
public $hasAndBelongsToMany = array('Product');
On May 14, 11:27 am, Beedge <[email protected]> wrote:
> Now that I think about it, would a tree structure mean that each sub
> category can only appear in one tree?
>
> e.g a furniture shop might have
>
> Living room > tables
>
> and
>
> Dining Room > tables
>
> so can the sub category tables appear in both trees?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---