Here is the scenario:

1)
An Area have many schools
A school belongs to an area

2)
A school have many equipments
An area have many equipments too
Thus, an equipment can belongs to either a school or an area (as in
belongs to the office of the area that govern all school)

3)
i have db table and models for area, school and equipment

4)
when an equipment belongs to a school, its area_id field will marked 0
when an equipment belongs to an area, its school_id field will marked
0

How can i define the belongsTo in Equipment class to work in my
requirement?


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to