简体   繁体   English

表名称的Cakephp命名约定

[英]Cakephp naming convention for table name

I have a table named job and is not plural but I was wondering if there is a way to overcome this so that cake can pickup singular table names. 我有一个名为job的表,它不是复数的,但是我想知道是否有一种方法可以克服这个问题,以便cake可以选择单数的表名。

I cannot change the table name as it is also used by other API's 我无法更改表名,因为其他API也使用该表名

Is there a way to do this in Cakephp? 有没有办法在Cakephp中做到这一点?

使用模型的useTable属性。

var $useTable = 'job';

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM