比方說,我有YAML方案看起來就像是:爲什麼我得到「驗證失敗」一個保存在Symfony 1.2的學說?
Note:
options:
type: MyISAM
collate: utf8_unicode_ci
charset: utf8
actAs: { Timestampable: ~ }
columns:
content: { type: string, notnull: true}
order_id: int(5)
user_id : int
relations:
User:
foreignAlias: Notes
local: user_id
foreign: id
type: one
foreignType: man
onDelete: CASCADE
當執行:
$note->setOrderId(0);
$note->save();
,我發現了以下錯誤:
1 validator failed on order_id (type)
MySQL的商店ORDER_ID爲BIGINT (20)。
我使用Ubuntu 9.10,Symfony的1.2,PHP 5和MySQL 5
編輯:
得到了暗示,如果我刪除的文件YAML的大小都不在話下,我得到一個第二order_id(長度)驗證錯誤:-)
我有同樣的問題,但在1.4。我在模式中將「字符串」更改爲「浮點數」...但在save()上我有這個錯誤。 – Manu 2012-04-24 08:52:28