我在 ps_customer 数据库和客户类中添加了两个新变量:
/** @var string ricetta */
public $ricetta;
/** @var int agente */
public $agente;
在定义数组中:
'agente' => array('type' => self::TYPE_INT, 'size' => 11),
'ricetta' => array('type' => self::TYPE_STRING, 'required' => true),
一切都是完美的;我可以在管理区域和整个环境中管理这些字段。
但是在前端PasswordControllerCore
被调用时会发生一些非常奇怪的事情。
我发现当 $customer->update(); 消耗后,数据库中的两个新字段 ($ricetta) 之一变为空。
客户更新会删除此字段,但不会删除其他自定义字段。($agente)
我为此变得疯狂......无法理解发生了什么:-(