throw an error if a new record is saved twice before getting an ID