title: How detach and Attach entity with JPA
body: <pre><code>User user = userRepository.findOne(1);
  user.setName("Alex");//I want to save it
  user.detache()
  user.setAge(44);//I dont want to save it 
  </code></pre>
  
  <p>How detach and Attach user with JPA <code>JpaRepository&lt;User, Long&gt;</code></p>
  
  <p>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? </p>