Your first two examples will not work as models are not plural.
http://book.cakephp.org/view/936/Importing-Controllers-Models-Components-Behaviors-
HTH, Paul.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site
Due to a client's desire to have URLs that defy Cake logic, i have
decided to use the pages controller to organize my app.
most the site's functionality occurs from one page through ajax so i
thought i'd use pages as the home base and access other controllers
and models.
so i decided to import
Not sure what the issue is, but in general I'd recommend that you set recursive
to -1 in your app_model and then use the Containable behaviour; it gives you
total control and my well solve your issue (as well as bring other
improvements).
Jeremy Burns
Class Outfit
http://www.classoutfit.com
I need some help with linking my database tables and models.
I have:
User
Profile
Post
A User has many posts, one profile and many friends(other users). I
want to display the users posts and the users friends posts on the
profile.
How should i build the database(like friendship between users)
You need an additional information - who is friend with whom - so a
new table users_users is born :)
So your relationships will be:
users hasMany posts
users hasAndBelongsToMany users through users_users.
And you have to find:
1) The current users post using users hasMany posts association.
2)
Hi,
I have two tables, franchises and owners.
The owners table has a foreign key to franchises called franchise_id.
I've defined a $hasMany relationship between franchise and owners (ie.
1 franchise can have many owners).
I've defined a $belongsTo relationship between owner and franchise
(ie.
So I have a cookbook application with recipes and categories:
Recipes
id:title:recipe:created_on:category_id
Categories
id:name
I am trying to use bake to setup the associations between the categories and
recipes:
CATEGORY MODEL
class Category extends AppModel {
var $name =
Hello Everyone,
I am trying to create an application where I have currently 2 tables -
a) users (id/username/password/email/name/created/modified)
b) profiles (lots of blah)
The association would be user hasOne profile and profile belongTo user.
Now, when I am signing the user up, my