Hello.

Can't get how to describe in CakePHP following model:

There's a list of SPECIALITIES in institute:
Model: Speciality
id
name

Also, there's a list of STUDY YEARS (1st,2nd etc.)
Model: Year
id
name

And, at last, there's a list of LECTURES:
Model:Lecture
id
name

Everything is clear and simple.

Now, I want to create an assotiations of lectures which are red to
students of some specialities and years.

For example, LECTURE "Mathematics" is red on 1st,2nd and 3rd years for
students who study on "Programmer" speciality; on 1st year for those
who study on "Book-keeper" and doesn't red for students who study on
"Artist" speciality.

It seems that hasAndBelongsToMany isn't helpful in this case.

I guess I need a link table with 3 foreign keys:

Table lectures_specialitys_years:
lecture_id
speciality_id
year_id
PRIMARY KEY(lecture_id,speciality_id,year_id)

But what should I do to explain this to CakePHP? It seems that
Scaffolding  doesn't support such cases.


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to