prepareBeforeAdd prepareBeforeUpdate