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 4046152
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T13:31:34+00:00 2026-05-20T13:31:34+00:00

In my ASP.NET webforms app, I am getting the above exception predominately, along with:

  • 0

In my ASP.NET webforms app, I am getting the above exception predominately, along with:
– A collection with cascade=”all-delete-orphan” was no longer referenced by the owning entity instance: Persistence.Product.ModelMap
– collection was processed twice by flush()
– Found shared references to a collection: Persistence.Product.ModelMap
when I am retrieving products. It happens only when I have two or more requests hit the server at once. I am using one session per request.

The property, ModelMap, is defined as follows in the Hibernate XML in the Products mapping definition:

<bag name="ModelMap" table="MapProductModel" cascade="all-delete-orphan" lazy="true" inverse="true" where="IsDeleted=0">
  <key column="fkProductId" />
  <one-to-many class="MapProductModel" />
</bag>

This happens on the following line of code

IList<T> itemList = criteria.List<T>();

When the retrieving the product.

Any help greatly appreciated, Google didn’t really turn up anything.

  • 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-05-20T13:31:35+00:00Added an answer on May 20, 2026 at 1:31 pm

    ASP.NET is multithreaded, so requests will come in on multiple threads in the same HTTP request. You should be using NHibernate’s web session context (or other means); creating a new session per HTTP request is not enough. See http://nhibernate.info/doc/nhibernate-reference/architecture.html#architecture-current-session

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

Sidebar

Related Questions

We have an ASP.NET webforms app that has try/catch blocks all throughout. In the
I have an ASP.net webforms app that connects to a web service, All the
I've got an ASP.NET WebForms app that I've written, which uses the ASP.NET AJAX
If I start running my asp.net WebForms app from the VS2008 IDE in debug
We have an ASP.NET 2.0 WebForms app that uses MS Ajax 1.0. It's working
I have a simple web app built in asp.net webforms c# where and how
In my .Net 2.0 Asp.net WebForms app, I have my Global.asax containing the following
I had this code in an old asp.net webforms app to take a MemoryStream
Currently I'm writing an ASP.net webforms app, which works with a table containing 15
I'm replacing an old ASP.NET webforms app with a new MVC application. However, I

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.