deleted the record in save method when it's detached, refs #164