title: Can not get database generated value after saving
body: <p>I'm using SpringBoot, Spring data and postgresql.</p>
  
  <p>In postgres I created one table.</p>
  
  <pre><code>CREATE EXTENSION "uuid-ossp";
  CREATE TABLE user (
      id serial PRIMARY KEY not null,          
      user_id varchar(255) not null default uuid_generate_v4()
  );   
  </code></pre>
  
  <p>Than create entity</p>
  
  <pre><code>@Entity
  public class User implements Serializable {
  
    private static final long serialVersionUID = 9129894781337596497L;
  
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(columnDefinition = "serial")
    private Integer id;
  
    @Column(insertable = false)
    private String userId;
  
    public static User create(){
      User user = new User();
      return user;
    }
  
    public String getUserId(){
      return userId;
    }
  
  }
  </code></pre>
  
  <p>Than create jpa repository like this</p>
  
  <pre><code>@Repository
  public interface UserRepository extends JpaRepository&lt;User, Integer&gt; {}
  </code></pre>
  
  <p>When I save the user I need to get id and userId but I get null instead and in database is generated UUID.</p>
  
  <pre><code>User user = userRepository.save(User.create());
  assertThat(user.getUserId()).isNotNull();
  </code></pre>
  
  <p>How can I get those generated values from database? </p>