CompanyBook / massive_record

HBase ruby client
130 stars 39 forks source link

Returning false in ex. before_save does not short circuit save if saved through parent #77

Open thhermansen opened 13 years ago

thhermansen commented 13 years ago

Normally a returned false in before_save etc will cancel the save call, but this is not the case when doing owner.save and and any embedded records return false on callbacks or save() in general. The embedded proxy just simply ignores it when parent_will_be_saved! is called.

It might be a headache to fix this, as we need to "roll back" the state of every embedded records where save() was successful. Oh well, its an issue, si I'll leave it here for now to be remember :-)