beforeSave declaration as in Ardent