update entity by adding uniqueId attribute and add persistence test