How to implement batch fetching with Fluent NHibernate when working with Oracle?

前端 未结 1 1805
天命终不由人
天命终不由人 2020-11-29 14:05

I\'ve tried using Future feature with Oracle but NHibernate does not support it.

I\'ve read some about Batch Fetching feature: http://docs.huihoo.com/hibernate/nhibe

相关标签:
1条回答
  • 2020-11-29 14:44

    To give you the answer how to use batching with fluent:

    1) on the colleciton

    HasMany<MyEntity>(x => x.Entities)
      .BatchSize(100);
    

    2) on a class level

    public MyEntityMap()
    {
        Id(x => x....
        ...
        BatchSize(100);
    

    This corresponds with the 19.1.5. Using batch fetching

    0 讨论(0)
提交回复
热议问题