Surya Wono
Surya Wono

Reputation: 79

cakephp error after upgrade to 2.5.4

i use 2.5.3 cakephp, everything go well, but when i upgrade it to 2.5.4 there is small error on table reading i have table called biodatas and model Biodata, all work well before, but after i upgrade it, it said error because cannot find biodata table, which without 's' what should i do?

{
    "code": 500,
    "name": "Table biodata for model Biodata was not found in datasource default.",
    "message": "Table biodata for model Biodata was not found in datasource default.",
    "url": "\/tokosayaonline\/customers\/loginaction"
}

Upvotes: 0

Views: 83

Answers (1)

ADmad
ADmad

Reputation: 8100

"datas" is an incorrect pluralization of "data" which has been fixed in 2.5.4. So either rename your table to "biodata" (and clear model cache) or add custom inflection rules in your bootstrap to keep the incorrect pluralization.

Edit: A third option is to add public $useTable = 'biodatas'; to your Biodata.php model file.

Upvotes: 1

Related Questions