I want to determine if a new record has been inserted or an old record has been added in afterSave (), but I have no idea how to do this.
I was thinking of writing a configuration variable in beforeSave () (where I can detect an insert if no identifier is set), but maybe this is not a safe way to do this.
Any ideas?
source share