I would like to have uneditable entries in my project. This means, based on "editable" field, or other conditions entry may not be updated. I solved this using beforeValidation and beforeDelete, returning false and appending an error message. However this caused problems, when I had those entries as related entities.
E.g. I have some objects, lets say music genres. User can create/update/delete genres, but some of them are default and can not be edited. Now I want to save a song with this genre and I can't, because Phalcon implicitly saves all related entities, and default genres are uneditable.
I could not find any way to check if object has been modified. There are some DIRTY_.. states, but it's unclear what do they actually do.
Does anyone have an idea how can this be achieved without breaking relations?