NHibernate 的 BUG?
Voucher12 和Voucher11 继承 VoucherEntity
VoucherEntity 包含属性 ID,CanPrint
Voucher12 包含一属性HandleCharge 为 Voucher11的实列
有这样一个HQL
From Voucher12 v Where v.CanPrint = true or v.HandleCharge.CanPrint =true
结果所有 Voucher11里 CanPrint=true的记录全被关联起来了
并不象期望的那样
From Voucher12 a inner join Voucher11 b
where a.ID = B.ID and ( a.CanPrint =true or b.CanPrint = true)
产生的结果和这个差不多
From Voucher12 a inner join Voucher11 b
where ( a.ID = B.ID and a.CanPrint =true ) or b.CanPrint = true)