Recent versions of ZODB allow writing persistent classes that have __getattr__, __delattr__, or __setattr__ methods. The one minor complication is that the machinery for automatically detecting changes to the object is disabled while the __getattr__, __delattr__, or __setattr__ method is executing. This means that if the object is modified, the object should be marked as dirty by setting the object's _p_changed method to true.