update entity to new db