2018年9月23日日曜日

【備忘録】CakePHP2 Modelを使用した登録

Thanks.
http://ultrah.zura.org/?p=4243

idをPrimaryKeyではなく別の意味で使っていると、単純にこれだけだと登録されずに更新になる。
$this->Model->create();
$this->Model->save();
Model中に
public $primaryKey = ‘no’;
or
public $primaryKeyArray = array(‘id’, ‘no’);
でPrimaryKeyを変更すれば大丈夫。

1 件のコメント:

  1. That standard limitation or exception could leave such private, non-commercial uses outside the scope of IP rights. Construction of a mannequin with up to date strategies can take wherever from a number of} hours to a number of} days, relying on the strategy used and the dimensions and complexity of the mannequin. Additive systems can stylus pen usually reduce this time to a few hours, although it varies broadly relying on the type of|the type of} machine used and the size and variety of fashions being produced simultaneously. The Fused Deposition Modeling printing course of patents expired in 2009.

    返信削除