Welcome Guest, Not a member yet? Register   Sign In
Datamapper ORM, from_array with optional hasOne associations
#1

[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.


Messages In This Thread
Datamapper ORM, from_array with optional hasOne associations - by El Forum - 07-04-2013, 08:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB