update data jpa and mongo codes snippets