title: Using @Version column does not allow @ManyToOne relationship property as a reference
body: <p>I'm using hibernate 3.6.3.Final. I have two relational entities A &amp; B with a unidirectional ManyToOne defined as:</p>
  
  <pre><code>
  @Entity public class A {
  ...
  @Version @Column ( name = "ChangeNumber" )
  public Long getVersion() { return version; }
  @ManyToOne @JoinColumn( name = "B_ID" )
  public B getRelationalB() { return relationalB; }
  ...
  }
  
  @Entity public class B {
  @Version @Column ( name = "ChangeNumber" )
  public Long getVersion() { return version; }
  ....
  }
  </code></pre>
  
  <p>Now suppose I have a B instance persistent in db already with pk id = 1, then doing the following operation:
  <pre><code>
  A a = new A();
  a.setRelationalB( new B( 1 ) );
  session.saveOrUpdate( a ) ;
  </pre></code>
  throws an the famous "TransientObjectException: object references an unsaved transient..." exception.
  Surprisingly enough, if @Version @Column is removed or made @Transient, the above code would work perfectly fine. 
  Any idea why i'm observing this behavior?</p>