Hi,
I had an application that was using Mysql as the database. We switched
to Postgres cause of client's request. Then we started to have some
problems with some delete operations.
Taking a look at the model_php5.php class, I saw that there is:
if ($this-id $db-delete($this)) {
$this-_deleteMulti($id);
$this-_deleteHasMany($id, $cascade);
$this-_deleteHasOne($id, $cascade);
$this-afterDelete();
$this-_clearCache();
$this-id = false;
return true;
}
But this causes an error in my Postgres beacause this operation above
tries to dele the entity berfore trying to delete the relations that
depend on the entity. So we get FK constraint error when
$db-delete($this) is executed, which seems natural to me.
Shouldn't the order of these delete calls be changed? The
$db-delete($this) call should not be the last one?
tks
[]s
Felipe
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---