update entity stats when inserting