开发者

Cakephp Model and Database Conventions

开发者 https://www.devze.com 2022-12-14 23:10 出处:网络
I just wondering for table field naming e.g. first_name开发者_运维技巧. in the data model. Is it ok i name as first_name also?

I just wondering for table field naming e.g. first_name开发者_运维技巧.

in the data model. Is it ok i name as first_name also?

Or must i change to firstName?

Thanks


Field names should use underscores according to the CakePHP conventions, see http://book.cakephp.org/view/24/Model-and-Database-Conventions


Which naming convention you use is entirely up to you, just so long as its not an invalid one (including spaces, etc). Go with what is most easily understood by you and your team.


since this field is not a primary key or a foreign key, there is no problem

0

精彩评论

暂无评论...
验证码 换一张
取 消