Cake is telling me:
Missing Controller
Error: EventController could not be found.
Error: Create the class EventController below in file: app/controllers/
event_controller.php
<?php
class EventController extends AppController {
var $name = 'Event';
}
?>
My Event Model (event.php in /models):
<?php
class Event extends AppModel
{
var $name = 'Event';
var $useTable = 'events';
var $hasOne = array(
'GalleryCategory' => array(
'className' => 'GalleryCategory',
'foreignKey' => 'id',
'associationForeignKey' => 'gallery_id',
'joinTable' => 'gallery_categories'
),
'EventCategory' => array(
'className' => 'EventCategory',
'foreignKey' => 'id',
'associationForeignKey' => 'cat_id',
'joinTable' => 'event_categories'
)
);
}
?>
Events Controllers (events_controller.php in /controllers):
<?php
class EventsController extends AppController
{
var $name = 'Events';
function index()
{
$this->set('events', $this->Event->findAll());
}
}
?>
When I make it singular it works for the most part; however, the
association event_categories doesn't work quite right. It will display
the name of each column within the array, but the values for those
items end up blank. I think for some reason it is steming from this
singular plural issue. Even if it isn't, I really need to fix this
problem before i go on. The most interesting thing is that the
association with GalleryCategory works just fine and all the values in
the array work perfectly. I have been stuck along all of these issues
for the past couple days. I have made soo many searches on this. Read
and reread all the conventions. I have no idea where to turn.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---