News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Chris Hartjes' Blog:
Dynamic Models in CakePHP 1.2
August 06, 2008 @ 09:34:33

In this new post to his blog Chris Hartjes mentions a "nifty little feature" that the latest version of the CakePHP framework has - dynamic models.

By default now, Cake will automatically use the AppModel class and create a unique alias to a database table if it does not find the file. This means that if you have a table that follows the Cake conventions, needs no validation, and has no associations to other tables, you don't even have to create the model file any more. Woah, talk about a serious time saver in some cases.

He also mentions a gotcha to keep an eye out for - misspelling the model name when you use it. It'll definitely break things. You can find out more about models in CakePHP from this section in their manual, The Cookbook.

0 comments voice your opinion now!
dynamic model cakephp framework appmodel naming convention


blog comments powered by Disqus

Similar Posts

Jonathan Snook's Blog: Easier Static Pages for CakePHP 1.2

Tim Koschuetzki's Blog: New Poll (Using CakePHP)

Developer.com: Fat Models and Skinny Controllers Bring Out the Best in Your MVC Framework

The Bakery: Six New Components/Articles/Tutorials (SOAP, XHR, Tickets, Models, Releases & Flashes)

Nomad PHP: June 2013 - Phil Sturgeon, "Laravel 4: Yet Another Framework- but different"


Community Events





Don't see your event here?
Let us know!


laravel update package language api opinion framework podcast tips list series zendserver library community symfony introduction deployment interview install release

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework