Cakephp Insert Ignore Feature?
- by SeanDowney
Is there a way to do an "insert ignore" in cake without using a model-query function?
$this->Model->save(array(
'id' => NULL,
'guid' => $guid,
'name' => $name,
));
Generates error:
Warning (512): SQL Error: 1062: Duplicate entry 'GUID.....' for key 'unique_guid' [CORE/cake/libs/model/datasources/dbo_source.php, line 524]
It would be great to be able to set some flag or option that says "don't care"