0

I'm pretty new to Nhibernate and QueryOver techniques. Peace if I'm asking some basic things ;)

My hbm looks like this,

<class 
    name="ElementLogic.Wms.Common.Core.Orderline,Domain" 
    table="ORDERLINE" 
    lazy="true" 
    dynamic-insert="true"
    dynamic-update="true"
    >

 <many-to-one
      name = "Product"
      class = "ElementLogic.Wms.Common.Core.Product, Domain"
      access="field.camelcase-underscore"
      cascade = "save-update"
      fetch="select"
      insert = "false"
      update = "false"
      property-ref = "ExtProductId">
      <column name="EXTPRODUCTID" />
    </many-to-one>

 <property type="int" name="UserId" column="[USERID]" />

</class>

I'm trying to join entities as follows , which works fine

 query.JoinAlias(() => _orderLineAlias.Product, () => _productAlias);

I just want to know if I can join the User entity in the same way, without having to alter the UserId feild to a many-to-one relationship. Is it possible to acheive? if so pls be patient to explain :)

/BB

4

1 回答 1

0

似乎没有办法解决这个问题。所以我继续将映射用户添加到 OrderLine。;)

/BB

于 2011-01-18T06:37:28.443 回答