2 answers
0 votes
How to create a relationship/association from one table/model to itself?
Hello,
how can i create a relationship from one model to itself?
In my case, i have a model "ports" with primary key "id" and foreign key "uplink_id".
Thanks if someone can help.
Greetings :)
0 answers
0 votes
retrieve related model data
Hello,
appendant to this question "- CakePHP question <-", i have a continuative problem. I'd like to show the following things in my view (respectively in the field uplink_id in the view): attribute "uplink_id" from table "ports" with attribute...
1 answer
0 votes
possible to use find('list') across models?
are there any cakephp way of using find('list', array('fields' = array('User.id', 'Profile.nickname')))); ?
if i do that it'll throw an error.
for the time being i am using a function i wrote to get the list, not flexible function at that.
Your...
1 answer
0 votes
Form Initialization with Linked Models
Hi,
I have a complex database setup whereby a user creates a "Submission" that in turn has several "Wips" (Works in progress) for each stage of the piece. Each submitted Wip belongsTo one "Stage" (i.e. concept) that defines the progress of the...
2 answers
0 votes
Set additional fields in HABTM Join Table
Hi,
I'm working on a messaging system for a site that will allow users to send a message to multiple other users. I figured the easiest way to do this would be to create three tables:
Messages
Users
and Messages_Users with the...
1 answer
0 votes
Limiting/Specifying Associated Queries
Hello,
Basically I'm wondering if there's an easy way to do 2 things. I have a two tables, submissions and users joined by a HABTM relationship via submissions_users.
EDIT: Figured this part out
___________________________
Now say, for efficiency,...