I have 3 tables.
Table1 has a one-to-many relationship to Table2.
Table2 has a one-to-many relationship to Table3.
I would like to write a web service API that allows the user to add rows to all 3 tables at the same time. The problem with CakePHP is that it only allows a controller to access its own corresponding model's data.
How can a controller access other models?
For my case in particular, which table should I use? Will Table1 be a good start since it is the parent to the other tables?
I am using Cakephp2.4.5