many-to-one无故引致一个Update语句
现有批次、批次产品两表,两者我只在批次产品中定义了一个many-to-one的关系
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
以下测试代码
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
却不知何故产生了一个Updata Batch的语句
NHibernate :SELECT this.ID as ID1_, this.IsConfirm as IsConfirm1_,
FROM BatchItem this left outer join Batch batch1_ on this.Batch_ID=batch1_.ID WHERE this.ProductCode = @p0
NHibernate :UPDATE Batch SET Title = @p0,
AccepterName = @p7 WHERE ID = @p8
![](https://www.cnblogs.com/Images/dot.gif)
NHibernate :UPDATE Batch SET Title = @p0,
![](https://www.cnblogs.com/Images/dot.gif)
真是莫名呀!请大家指点一二。谢谢