I'm building a basic CMS and I have a 'users' table that is related to
more than one other table. The 'users' table is related to these other
tables by a '$hasMany' relationship. I did the bare minimum in terms
of setting up my models and databases using the $scaffold feature so I
could be sure everything worked before getting in too deep. Cake set
everything up for me nicely except for anything having to do with my
'users' table which is related to a bunch of other tables in a
$hasMany relationship. I'm pretty new to PHP so I'm not sure if I just
have a syntax problem or if PHP doesn't allow one table to have more
than one $hasMany relationship. Here is the model code I am having
trouble with:
<?php
class User extends AppModel {
var $name = 'User';
var $hasMany = array('Article');
var $hasMany = array('Event');
var $hasMany = array('Post');
var $hasMany = array('Price');
var $hasMany = array('Upload');
}
?>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---