I am trying to add more then one table but i get an error does anybody
know what is wrong with this? Or what would be the correct way to
define more then one HABTM Table ?
<?php
class Item extends AppModel {
var $name = 'Item';
var $hasAndBelongsToMany = array('File' => array('className' =>
'File',
'joinTable' => 'files_items',
'foreignKey' => 'item_id',
'associationForeignKey'=> 'file_id',
'conditions' => '',
'order' => '',
'limit' => '',
'unique' => true,
'finderQuery' => '',
'deleteQuery' => '',
),
array('Category' => array('className' => 'Category',
'joinTable' => 'categories_items',
'foreignKey' => 'item_id',
'associationForeignKey'=> 'category_id',
'conditions' => '',
'order' => '',
'limit' => '',
'unique' => true,
'finderQuery' => '',
'deleteQuery' => '',
)
)
);
}
?>
The error i get is:
Warning: Illegal offset type in E:\xampp\htdocs\portfolio\cake\libs
\model\model_php5.php on line 402
Notice: Array to string conversion in E:\xampp\htdocs\portfolio\cake
\libs\inflector.php on line 348
Notice: Array to string conversion in E:\xampp\htdocs\portfolio\cake
\libs\inflector.php on line 348
Warning: class_exists() expects parameter 1 to be string, array given
in E:\xampp\htdocs\portfolio\cake\libs\model\model_php5.php on line
429
Warning: class_exists() expects parameter 1 to be string, array given
in E:\xampp\htdocs\portfolio\cake\basics.php on line 164
Notice: Array to string conversion in E:\xampp\htdocs\portfolio\cake
\libs\inflector.php on line 348
Notice: Array to string conversion in E:\xampp\htdocs\portfolio\cake
\libs\inflector.php on line 348
Fatal error: Class name must be a valid object or a string in E:\xampp
\htdocs\portfolio\cake\libs\model\model_php5.php on line 437
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---