select before update for hibernate entities