I am trying to make EntityA contains EntityB id and EntityB instance. But EntityB instance property is only used as a getter, when saving, entityBId should be used.
The mapping file I write is 
Code:
   <class name="EntityA"  table="EntityA">
      <id name="Id" type="Int64" column="id" >
         <generator class="native" />
      </id>
      <property name="EntityBId">
         <column name="b_id"/>
      </property>
      <many-to-one name="EntityB" class="EntityB">
         <column name="b_id"/> sql-type="bigint" not-null="false"/>
      </many-to-one>
   </class>
but when running it, nhibernate tell me column "b_id" appears twice and it is invalid. How to correct it? Thanks