Nhibernate - 将多个参数传递给load-collection

时间:2012-04-16 10:50:49

标签: nhibernate

我在.hbm.xml中使用sql-query loader进行集合映射:

`<sql-query name="conpoints">
<load-collection alias="conpoint" role="Substation.ConnectionPoints" />
    SELECT {conpoint.*}
    FROM CONNECTIONPOINT AS conpoint
    WHERE (conpoint.substationID=:Id AND NOT conpoint.ID=:ReceiverConnectionPoint.Id)
</sql-query>`

我需要传递Id和ReceiverConnectionPoint.Id参数。但NH只接受其中一个。如何在sql-query中传递多个参数?

0 个答案:

没有答案