Model Association (again)

2006-10-24 Thread roby

Hi all.

I'm going to track down the user's educations so I can make
portfolio-like page for my application. The portfolio-like page will be
per user, each has the information about the user's educations.

I made the tables' relations in my database like these:
1). users: (PK)user_id + email + password + first_name + last_name
2). h_educations: (PK)education_id + (FK to users)user_id
3). d_educations: (PK and FK to h_educations)education_id +
(PK)school_name + (FK to countries)country_id + start_date +
finish_date
4). countries: (PK)country_id + country_name

Do my approach correct? If it is correct, I'm confused how to define
the associations. Will HABTM work here? If yes, which model should I
define HABTM? Any suggestions please... thanks.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Model Association (again)

2006-10-24 Thread Ismael S. Kafeltz

Maybe this can help you:

http://wiki.cakephp.org/docs:understanding_associations


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---