User user = userRepository.findOne(1);
user.setName("Alex");//I want to save it
user.detache()
user.setAge(44);//I dont want to save it
How detach and Attach user with JPA JpaRepository<User, Long>
That's a fundamental principle of JPA. You work with attached (managed) entities, and every modification made on these managed entities is automatically made persistent but in same case I want to turn off it. How to do it in clean way?