Hi All,
Anyone could advise - I've got a Unique index on Dataobject like
static $indexes = array(
"UniqName" => array(
"type" => "unique",
"value" => "`URL`"
)
);
When i try writing a Dataobject with $item->write() it would give me a n error "[User Error] Couldn't run query: UPDATE... " ... Duplicate entry 'http://google.com' for key 2.
I was pinpointed by UncleCheese over the IRC that error handling is :
public function databaseError($msg, $errorLevel = E_USER_ERROR) {
user_error($msg, $errorLevel);
}
So probably there wont be easy solution like try...catch or smth.
But if you have found a solution for this - please post it here .
PS - I cannot check for duplicates on each write, as there's over 100K records, and doing so would just kill the script .