add beforeSave() to build entities of object chain
Merge remote-tracking branch 'origin/4.0-bedita-objects' into 4.0-bedita-objects