1

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/nhibernate-reference-1.2.0/performance.html

How could I use it with Fluent NHibernate? how should it be configured?

The Light
  • 26,341
  • 62
  • 176
  • 258
  • I tried to explain you, that `BatchSize(25)` in your mapping *(see http://stackoverflow.com/questions/20986026/)* would do that job. What exactly is not working? I mean your prev question http://stackoverflow.com/questions/20970680 – Radim Köhler Jan 08 '14 at 12:27
  • It's the first time I've written this question, and the link you sent is not my question so a coincidence if the timing looks near. – The Light Jan 08 '14 at 14:45
  • Your question: How to Eager Load Associations without duplication in NHibernate? (the second link in my comment http://stackoverflow.com/questions/20970680). The first link I've sent -- it is the answer. use BatchSize(25) as I've already told you... – Radim Köhler Jan 08 '14 at 14:53

1 Answers1

4

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

Owen Pauling
  • 11,349
  • 20
  • 53
  • 64
Radim Köhler
  • 122,561
  • 47
  • 239
  • 335