NHibernate SetTimeout on ICriteria

前端 未结 2 1662
挽巷
挽巷 2021-02-18 12:55

Could someone tell me what the units the SetTimeout(int) method in the ICriteria interface uses?
Is it milliseconds, seconds, minutes or other?

2条回答
  •  旧巷少年郎
    2021-02-18 13:40

    I think it's seconds. The NHibernate API closely mirrors Hibernate Core for Java, where the Criteria.setTimeout(int) method uses seconds as the units (see also Statement.setQueryTimeout(int)).

    Also, after looking at some NHibernate source, it appears that it's using that value to set the timeout for the underlying ADO.NET query, which uses seconds.

提交回复
热议问题