Re: Model can't find the table in the database
I just looked online and found another plea for help involving that
msg. ACL was involved there as well. Alas, no fix mentioned.
On Thu, Nov 22, 2012 at 11:18 AM, andrea esposito
<andreaesposito77@gmail.com> wrote:
> Yes,it is.I have the model name Product and the table name products.The
> model is stored in app/models/product.php.I am using cakephp 1.3.
>
>
> 2012/11/21 lowpass <zijn.digital@gmail.com>
>>
>> Is that literally the error msg? Do you have a model name "Model"?
>>
>> On Wed, Nov 21, 2012 at 11:43 AM, and <andreaesposito77@gmail.com> wrote:
>> > Hi all,
>> > I have this error:
>> > Error: Database table models for model model was not found.
>> >
>> > I have a product model
>> > <?php
>> >
>> > class Product extends AppModel{
>> > var $name='Product';
>> > var $actsAs=array('Acl'=>array('type'=>'controlled'));
>> > var $belongsTo=array('Dealer'=>array('className'=>'Dealer',
>> > 'foreignKey'=>'dealer_id'));
>> >
>> > function parentNode(){
>> > if( !$this->id && empty($this->data)){
>> > return null;
>> > }
>> > $data=$this->data;
>> > if( !$data['Product']['dealer_id'] ){
>> > return null;
>> > }
>> > else{
>> > return
>> > array('model'=>'Dealer','foreignKey'=>$data['Product']['dealer_id']);
>> > }
>> > }
>> > }
>> > ?>
>> > And a db table named products.How can I fix it?
>> >
>> > --
>> > Like Us on FaceBook https://www.facebook.com/CakePHP
>> > Find us on Twitter http://twitter.com/CakePHP
>> >
>> > ---
>> > 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+unsubscribe@googlegroups.com.
>> > Visit this group at http://groups.google.com/group/cake-php?hl=en.
>> >
>> >
>>
>> --
>> Like Us on FaceBook https://www.facebook.com/CakePHP
>> Find us on Twitter http://twitter.com/CakePHP
>>
>> ---
>> 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+unsubscribe@googlegroups.com.
>> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>>
>>
>
>
>
> --
> Andrea Esposito
> Via Monte Matese,2
> 81025 Marcianise (CE)
> Tel:0823824162 cell:+393277198705
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> 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+unsubscribe@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
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+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home