title: JPA does not return default value after saving
body: <p>I faced a problem.
  A have an entity:</p>
  <pre><code>@Entity
  @Table(name = &quot;user&quot;)
  public class User {
  
    @Id
    @GeneratedValue
    private Integer id;
  
    @Column(name = &quot;date_create&quot;, insertable = false, updatable = false, nullable = false)
    private Date dateCreate;
  
  }
  </code></pre>
  <p>DDL of the related table:</p>
  <pre><code>CREATE TABLE user (
    id SERIAL PRIMARY KEY,
    date_create TIMESTAMP NOT NULL DEFAULT now()
  );
  </code></pre>
  <p>I have such logic:</p>
  <pre><code>@Service
  public class Service1 {
  
    @Autowired
    private UserRepository userRepository;
  
    @Transactional
    public User createUser() {
      return userRepository(new User());
    }
   }
  
   @Service
   public class Service2 {
  
     @Autowired
     private Service1 service1;
  
     public void createUser() {
       User createdUser = service1.createUser();
       System.out.println(createdUser.getDateCreate()); // actual result : null
     }
    }
  </code></pre>
  <p>Field <strong>dateCreate</strong> is set by DB function now() but it is not returned by JPA in created entity.</p>
  <p><strong>Does anyone know how to solve this problem? Without using Hibernate or Spring specific tools. Just JPA.</strong></p>