Search code examples
c#hibernatenhibernatenhibernate-criteria

NHibernate Futures vs CreateMultiCriteria


I have used both NHibernate Futures and NHibernate CreateMultiCriteria in the past to batch sql queries. Are there any reasons why I would want to use one or the other. Are both of those methods equivalent or is it a matter of preference?


Solution

  • From my understanding, CreateMultiCriteria isn't supported by some databases. I've only tried it on MySQL and SQL Server. Check your provider's SupportsMultipleQueries property. Futures fall back to single requests or batches if the provider supports it.