Fixes a problem where the storeId would get updated even though the record doesn’t have an id yet.