Check filename of ActivitiesHostess model, it should be
activities_hostess.php Such error will occur if Cake is unable to find
your model file and load "generic" model that assume conventional
table name.

On May 13, 1:01 am, deefens <steff.muel...@gmail.com> wrote:
> hi john,
>
> it still doesn't work. i get the same message again:
>
> "Error:  Database table activities_hostesses for model
> ActivitiesHostess was not found"
>
> :(
>
> On 12 Mai, 09:47, John Andersen <j.andersen...@gmail.com> wrote:
>
> > If I understand what I read from the source, then your code should be:
>
> > ... bindModel( array( 'hasOne' => array('ActivitiesHostess' => array
> > ('ActivitiesHostess') ) ), false )'
>
> > Thus your models name should be used as the name for the model that
> > CakePHP thinks it has to use (inflected etc)!
> > Enjoy,
> >    John
>
> > On May 12, 9:07 am, deefens <steff.muel...@gmail.com> wrote:
>
> > > nobody familar with this? *hope*
>
> > > On 9 Mai, 09:16, deefens <steff.muel...@gmail.com> wrote:
>
> > > > Hi guys,
>
> > > > this is driving me nuts: when i use bindModel() to add a relationship
> > > > on the fly to an certain model, it seems that cake ignores the table
> > > > name specified in the attached model in var $useTable.
>
> > > > Example:
>
> > > > class ActivitiesHostess extends AppModel {
>
> > > >    var $name = 'ActivitiesHostess';
> > > >    var $useTable = 'v_activities_hostess';
>
> > > >    var $belongsTo = array('Activity', 'Hostess');
>
> > > > }
>
> > > > this is my added relationship class, providing one girl per activity
> > > > (don't mess, thats a harmless website smile.gif. so i attach this on
> > > > the fly in the hostess controller:
>
> > > > $url['activity']?$this->Hostess->bindModel(array('hasOne'=>array
> > > > ('ActivitiesHostess' => array())), false):'';
>
> > > > but then, after clearing the cache and reload the website cake says:
>
> > > > >>> Error:  Database table activities_hostesses for model 
> > > > >>> ActivitiesHostess was not found.
>
> > > > but in the model i specified the table name as v_activities_hostess
> > > > (it's a view). has anyone any explanation for this or a workaround to
> > > > avoid cake aborting here? googled half the world, but didn't have any
> > > > success...
>
> > > > any hints are very appreciated
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to