Skip to content

Adjust the doc about flush on commit #3475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions doc/reference/modules/manipulating_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -838,9 +838,11 @@ sess.Lock(pk, LockMode.Upgrade);]]></programlisting>
It is possible to change the default behavior so that flush occurs less frequently.
The <literal>FlushMode</literal> class defines three different modes:
only flush at commit time (and only when the NHibernate <literal>ITransaction</literal>
API is used, or inside a transaction scope), flush automatically using the explained
routine (will only work inside an explicit NHibernate <literal>ITransaction</literal> or
inside a transaction scope), or never flush unless
API is used, or inside a transaction scope with a legacy option enabled - see
<xref linkend="transactions-scopes"/>), flush automatically using the explained
routine (will only work inside an explicit NHibernate <literal>ITransaction</literal>, or
inside a transaction scope with limitations for flushes on commit - see
<xref linkend="transactions-scopes"/>), or never flush unless
<literal>Flush()</literal> is called explicitly. The last mode is useful for long
running units of work, where an ISession is kept open and disconnected for a long time
(see <xref linkend="transactions-optimistic" />).
Expand Down