title: Hibernate - Declaring A Transient object in a pojo
body: <p>I have a pojo that is object A , of table TableA</p>
  
  <p><code>TableA (int a1,int a2)</code>. </p>
  
  <p>To fill the table I run a query that returns (int a1, int a2, boolean b3) (and runs multiple data checks)</p>
  
  <p>b3 is not valid in TableA , but I still want to use the same pojo for both (it's a very big pojo , and it will be a major code duplication to have one just for the sake of the query)</p>
  
  <p>I've declared in the pojo </p>
  
  <pre><code>@Transient
  Boolean getB3() {..}
  void setB3(Boolean b3) {..} 
  </code></pre>
  
  <p>And in the query I declared that I expect to get the b3 value:</p>
  
  <pre><code>&lt;return&gt; ...
  &lt;return-property name="b3" column="b3"/&gt;
  ...
  &lt;/return&gt;
  </code></pre>
  
  <p>But Hibernate just ignores the parameter and never use "setB3()".. 
  When I remove the @Transient , it works (and then fail when inserting to the table , naturally) - so all the names are correct</p>
  
  <p>How can I fix this? </p>
  
  <p>Thanks!</p>