Model conventions: http://book.cakephp.org/view/901/CakePHP-Conventions

But in case you can't be bothered to read it, let me spell it out for you.

Table name - lower case, plural, underscored.
Field names: lowercase, underscored.
Model filename: Singular, camel cased.
Model class name:  Singular, camel cased.

So your models are:

Table stores: store.php, model class Store
Table test_stores: test_store.php, model class TestStores

Jeremy Burns
[email protected]
(Skype) +44 208 123 3822 (jeremy_burns)
(m) +44 7973 481949
(h) +44 208 530 7573

On 20 May 2010, at 13:54, Narendra Padala wrote:

> Hi...All i am new to cakephp, i have problem in creating model please help me 
> out...!
> 
> My table names like this
> 
> Table one : stores
> Table two : test_stores
> 
> For one i create like this.
> 
> File name: store.php
> --------------------
> <?php
>     class Stores extends AppModel {
>         var $name = 'Store';
>     }
> ?>
> For second table how can i create model help me out.?
> 
> For "test_stores" this how can i create model ?
> 
> 
> 
> Thanks in Advance.
> 
> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected] 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 [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to