Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8913533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:29:14+00:00 2026-06-15T04:29:14+00:00

Preface: This question is a derivative of this answer , speaking specifically about NHibernate

  • 0

Preface: This question is a derivative of this answer, speaking specifically about NHibernate instead of Hibernate.

As to Hibernate, javadoc to org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(EventSource) says:

Execute all SQL and second-level cache updates, in a special order so that foreign-key constraints cannot be violated:

  1. Inserts, in the order they were performed
  2. Updates Deletion of collection elements
  3. Insertion of collection elements
  4. Deletes, in the order they were performed

My Questions:

  1. If it applies to Hibernate, does this order apply to NHibernate too?
  2. Is this deterministic order documented somewhere?

Also – If this behavior is DBMS-specific, I’m using SQL Server.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T04:29:15+00:00Added an answer on June 15, 2026 at 4:29 am

    The documentation of NHibernate 3.3 is in detail describing the steps when the Session.Flush is called (point 9.6). In case of session.FlushMode = FlushMode.Commit; this is how the transaction batch will be executed:

    • http://nhibernate.info/doc/nhibernate-reference/manipulatingdata.html#manipulatingdata-flushing

    The steps are:

    • all entity insertions, in the same order the corresponding objects were saved using ISession.Save()

    • all entity updates

    • all collection deletions

    • all collection element deletions, updates and insertions

    • all collection insertions

    • all entity deletions, in the same order the corresponding objects were deleted using ISession.Delete()

    I am mostly using SQL Server (2008) and can say that this is working this way..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Preface: This is a derivative question of the following questions: Best practice on passing
Preface: This question is about a project I am working on with a professor
To preface, I've seen the command to answer this question before, but now I
I should preface this question by saying I think the answer is probably no,
(Preface: this question is about ASP.NET MVC 3.0 which was released in 2011 ,
To preface this question I should say I know very little about database efficiency
Let me preface this question by saying I've exhausted Google, or at least what
I should preface this question by saying that I am new to JavaServer Pages.
Let me preface this question. I have just started using jquery, so please be
Ok, let me preface this question with the fact that I am extremely new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.