Hi everyone,
I have two models, Employee and Customer. Employee belongsTo
Customer. I want to have a view Employee/index/customer_id where I can
have a table view of all employees that belong to a certain
customer.
How would I go about calling the Customer Model to genrate a data set
that
add this in your controller
var $uses = array('Model2','Model3');
or if not working try to
var $uses =
array('YourCurrentModelName','Model1','Model2','Model_etc');
for your case. did you want to access Customer model in
employees_controller ?
just add :
var $uses = array('Customer');
or
var
Thanks. I was able to get it. That helped alot!!!
On Jan 6, 1:57 pm, polutan [EMAIL PROTECTED] wrote:
add this in your controller
var $uses = array('Model2','Model3');
or if not working try to
var $uses =
array('YourCurrentModelName','Model1','Model2','Model_etc');
for your case. did
No you do not need var $uses if you have associations. $this-Employee-
Customer will work just fine.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email to
Hey gwoo, you are right. I had commented out an association in my
customer_model, when I uncommented it and took out the var $uses, it
still worked.
thanks for the help
On Jan 6, 5:53 pm, gwoo [EMAIL PROTECTED] wrote:
No you do not need var $uses if you have associations. $this-Employee-