Are you using primary keys as foreign keys as well?
Also when posting an error it's more helpfull to post the full backtrace as well, that makes it a lot easier to track what is going on.
It maybe a bag of FuelPHP.
I dealt with it in this way.
@Namespace Orm class HasOne.
(packages/orm/classes/hasone.php)
public function delete($model_from, $model_to, $parent_deleted, $cascade)
---
if ($model_to and ! $model_to->frozen())
{
foreach ($this->key_to as $fk)
{
$model_to->{$fk} = null;
}
}
$cascade = is_null($cascade) ? $this->cascade_delete : (bool) $cascade;
if ($cascade and ! empty($model_to))
{
$model_to->delete();
}
==========>>>>>>>>>>
$cascade = is_null($cascade) ? $this->cascade_delete : (bool) $cascade;
if ($cascade and $model_to and ! $model_to->frozen())
{
foreach ($this->key_to as $fk)
{
$model_to->{$fk} = null;
}
}
if ($cascade and ! empty($model_to))
{
$model_to->delete();
}