The NHibernate Book discusses very briefly queries that fetch several queries at the same time. They only show how to do this with the native CreateSQLQuery command. Are there any options for fetching multiple entities simultaneously using the criteria or hql APIs?
views:
77answers:
2
A:
For executing several sql quires in one trip to the data base you can use futures. And also ado.net batch size can trigger NHibernate to join several db calls into one.
Sly
2010-04-23 07:19:31
ado.net batch size is for updates ... correct me if I am wrong.
Rookian
2010-08-24 21:18:40
and inserts in some cases
Sly
2010-08-25 06:25:36
+2
A:
You also have MultiCriteria / MultiQuery support for executing several queries in the same database-roundtrip, utilizing 1st level cache efficently.
http://gnschenker.blogspot.com/2007/06/optimize-nhibernate-queries.html http://ayende.com/Blog/archive/2007/05/20/NHibernate-Multi-Criteria.aspx
jishi
2010-04-23 08:29:16