使用 Oracle 时如何使用 Fluent NHibernate 实现批量提取? [英] How to implement batch fetching with Fluent NHibernate when working with Oracle?

查看:13
本文介绍了使用 Oracle 时如何使用 Fluent NHibernate 实现批量提取?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试过在 Oracle 中使用 Future 特性,但 NHibernate 不支持它.

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

我已经阅读了一些关于批量获取功能的文章:http://docs.huihoo.com/hibernate/nhibernate-reference-1.2.0/performance.html

I've read some about Batch Fetching feature: http://docs.huihoo.com/hibernate/nhibernate-reference-1.2.0/performance.html

我如何将它与 Fluent NHibernate 一起使用?应该怎么配置?

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

推荐答案

给你答案如何在 fluent 中使用批处理:

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

1) 关于收藏

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

2) 在类级别

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

这对应于 19.1.5.使用批量提取

这篇关于使用 Oracle 时如何使用 Fluent NHibernate 实现批量提取?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆