Hello, I am new to Cake from Rails,
I currently have a City Model, a Neighborhood Model, and a Location Modle.
Location belongs to a neighborhood, and a neighborhood belongs to a city. I
am trying to get all of the locations for a city using something like this:
var $hasMany = array(
'Location' => array(
'className' => 'Location',
'finderQuery' => 'SELECT allLocations.*, FROM neighborhoods,
allLocations WHERE {$__cakeID__$} = neighborhoods.city_id AND
allLocations.neighborhood_id = neighborhoods.id '
)
);
Is this the right path? I am running into an error:
Missing Database Table
Error: Database table locations for model Location was not found.
How can I specify that the table is called allLocations?
Thanks,
-Seth
--
View this message in context:
http://www.nabble.com/finderQuery-help-tp23162894p23162894.html
Sent from the CakePHP mailing list archive at Nabble.com.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---