Dr. Loboto, you saved my day. Thank you so much, now its working
properly

@MPeg: check your model-filenames, in my situation this was the fault



On 13 Mai, 10:28, MPeg <marco.pegor...@gmail.com> wrote:
> Hi, I have the same problem in my application: "useTable" it seems to
> be ignored.
>
> I use a model's class in his own controller correctly so I think Cake
> is able to load it via naming convenctions correctly to!
>
> I think so but Cake still ignore mi configuration in relations!
>
> What to do?
> I hate to rename tables to follow cake conventions... i use some area-
> prefix to mantain order into db tables!
>
> On May 13, 5:46 am, "Dr. Loboto" <drlob...@gmail.com> wrote:
>
> > 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