title: Hibernate: Have a field that is not-peristed but can be pulled from DB?
body: <p>I am the following <code>Hibernate</code> Entity:</p>
  <pre><code>@Entity(name = &quot;status&quot;)
  @Table(name = &quot;status&quot;)
  public class Status implements Serializable {
  
      @Id
      @JsonProperty
      @Column(name = &quot;status_id&quot;)
      private Integer statusId;
  
  
      @JsonProperty
      @Column(name = &quot;status_label&quot;)
      private String statusLabel;
  
      @JsonProperty
      @Transient
      private String statusOrigin;
  
  }
  </code></pre>
  <p><code>statusOrigin</code> is transient as it is <strong>not</strong> a column in the <code>status</code> table.</p>
  <p>This works fine for creating the object with only <code>statusId</code> and <code>statusLabel</code> fields as expected.</p>
  <p><em>However</em> when I want to return the Status object to the front end with a join query which populates all 3 fields it does not work as <code>statusOrigin</code> is transient.</p>
  <p>How can I do the following:</p>
  <ol>
  <li>keep the create functionality as it is</li>
  <li>Ensure that statusOrigin field is populated from the results of the join query and sent to UI</li>
  </ol>