I was using an example...

It has this:

// /app/plugins/pizza/models/example_model.php:
class ExampleModel extends PizzaAppModel {
        var $name = 'ExampleModel';
        var $hasMany = array('Pizza.PizzaOrder');
}
?>

Buttt, which breaks some automagic stuff. I've found that changing the
above to:

// /app/plugins/pizza/models/example_model.php:
class Example extends PizzaAppModel {
        var $name = 'Example';
        var $hasMany = array('Pizza.PizzaOrder');
}
?>

Just dropping the word model, just like how they are in the main app
it fixes everything.
Thanks...

On Jan 10, 7:57 pm, Amit Badkas <amit.sanis...@gmail.com> wrote:
> Hi,
>
> http://book.cakephp.org/view/1114/Plugin-Modelsdoesn't have what you
> mentioned. It uses model name as 'PizzaOrder' and not 'PizzaOrderModel'.
>
> Amit Badkas
>
> PHP Applications for E-Biz:http://www.sanisoft.com
>
> On Tue, Jan 11, 2011 at 5:42 AM, Parris <presid...@parrisstudios.com> wrote:
> > Hi All,
> > I was wondering why the plugin tutorial names models like:
> > "PizzaOrderModel." I understand Pizza is the name of the plugin, and
> > am fine with that, but the word model throws off the convention. Plus
> > it breaks a few other things like validation. It also forces you to
> > use: var $uses in your controllers. When I take the word model out of
> > the name everything works as expected and should.
>
> > Thanks,
> > Parris
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > 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<cake-php%2bunsubscr...@googlegroups.com>For
> >  more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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