title: Can properties mapped in hbm.xml be transient?
body: <p>Suppose I have a <code>User</code> entity like this:</p>
  
  <pre><code>class User {
      private String login;
      transient private String hashedPassword;
  }
  </code></pre>
  
  <p>I don't want to ever transfer <code>hashedPassword</code> to clients, so I make it transient.</p>
  
  <p>This class is mapped by Hibernate, with both fields mapped in hbm.xml.</p>
  
  <p>Is this implementation safe and correct?  Will Hibernate correctly store <code>hashedPassword</code> in database, load it into objects from database, keep it in replicated 2nd level cache and local session cache etc?</p>
  
  <p>In order words, does Hibernate or 2nd level cache respect <code>transient</code> in any way or completely ignore it?</p>
  
  <p><strong>EDIT</strong>: I already got two answers that didn't seem to include one specific aspect of the equation. I am not using annotations at all, only XML mappings in <code>hbm.xml</code>. And this Java-transient field is OR-mapped in <code>hbm.xml</code>.</p>