[eluser]Unknown[/eluser]
I'm reporting a problem with the from_array code of when a hasOne is optional. When a value is not set in the data, the code attempts to delete an old value for the association. However, if the value of the association was not previously set, a database error is throw about being unable to related models. The delete operation on line 165 needs to be protected by exists test on the old value.