Fluent Nhibernate有问题,它的加载相关表只在服务器上非常慢而在本地正常。当我使用延迟加载而不调用ProductImageValuesTest
它工作正常。当通过Ado net请求调用时也没有问题
public class ProductTestMap:ClassMap<ProductTest>
{
public ProductTestMap()
{
Id(p => p.EntityId);
Map(p => p.ProductName);
Map(p => p.PartNo);
Map(p => p.SmallDesc);
Map(p => p.StockCount);
Map(p => p.StockId).Unique().Not.Nullable();
Map(p => p.StockIdSecondary);
Map(p => p.UploadTime);
Map(p => p.ExtraInfo);
Map(p => p.Deleted).Not.Nullable().Default("0");
HasMany(x => x.ProductImageValuesTest).Not.LazyLoad();
}
}
public class ProductImageValueTestMap : ClassMap<ProductImageValueTest>
{
public ProductImageValueTestMap()
{
Id(x => x.EntityId);
Map(x => x.ImageName);
Map(x => x.ThumbImageName);
Map(x => x.OriginalImageWatermark);
Map(x => x.Rank);
}
}