title: hibernate default value of transient member
body: <p>I have a transient boolean member that should be set to true when I retrieve the entity from db, but it should be false when I create a new object until it is persisted. After it is saved to db the member should become true.
  There is a way to make hibernate manage this automatically or should I do it in the manager?
  Hope the following code will clarify my needs.</p>
  
  <pre><code>class MyEntity(){
      @Id
      Integer id;
  
      @Transient
      boolean required;
  }
  
  class Test(){
      MyEntity entity1 = new MyEntity();
      assertFalse(entity1.required);
  
      persist(entity1);
      assertTrue(entity1.required);
  
      MyEntity entityAlreadySaved = getMyEntityWithID(1);
      assertTrue(entityAlreadySaved.required);
  }
  </code></pre>