1. table: cms_articles
    model: CmsArticle

2. table: shop_categories
    model: ShopCategory

3. table: shop_categories_cms_articles
    model: ShopCategoriesCmsArticle

relation:
CmsArticle hasAndBelongsToMany ShopCategory

defined by:
var $hasAndBelongsToMany = array(
                        'ShopCategory' =>
                                 array('className' => 'ShopCategory',
                                                'conditions' => '',
                                                'order' => '',
                                                'foreignKey' => '',
                                                'joinTable' => 
'ShopCategoriesCmsArticle',
                                                'associationForeignKey' => '',
                                                'uniq' => '',
                                                'finderQuery' => '',
                                                'deleteQuery' => '',
                                                'insertQuery' => ''),
);

in the model

class CmsArticle extends AppModel
{
        var $name = 'CmsArticle';

        var $hasAndBelongsToMany = array(
                        'ShopCategory' =>
                                 array('className' => 'ShopCategory',
                                                'conditions' => '',
                                                'order' => '',
                                                'foreignKey' => '',
                                                'joinTable' => 
'ShopCategoriesCmsArticle',
                                                'associationForeignKey' => '',
                                                'uniq' => '',
                                                'finderQuery' => '',
                                                'deleteQuery' => '',
                                                'insertQuery' => ''),
}


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to