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

  • SEARCH
  • Home
  • 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 9204473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:43:10+00:00 2026-06-17T23:43:10+00:00

I have an odd problem that has me completely stumped. Unfortunately I have a

  • 0

I have an odd problem that has me completely stumped.

Unfortunately I have a domain object which has a lot of relationships on it (I can’t alter this) essentially when I am building up my query and just simply adding eager fetches in, after I add a certain amount, the build time increases drastically until eventually visual studio just freezes and crashes. The query is pretty simple it looks something like this:

var query = QueryOver<DomainObject>
.Fetch(x => x.Property).Eager
.Fetch(x => x.Property.PropertyA).Eager
.Fetch(x => x.Property.PropertyB).Eager
.Fetch(x => x.Property.PropertyC).Eager
.Fetch(x => x.Property.PropertyD.SubProp).Eager
.Fetch(x => x.Property.PropertyE).Eager
.Fetch(x => x.Property.PropertyF.SubProp).Eager
.Fetch(x => x.Property.PropertyG).Eager
.Fetch(x => x.Property.PropertyH.SubProp).Eager
.Fetch(x => x.Property.PropertyI).Eager
.Fetch(x => x.Property.PropertyJ).Eager
.Fetch(x => x.Property.PropertyK).Eager
.Fetch(x => x.Property.PropertyL).Eager
.Fetch(x => x.Property.PropertyM).Eager
.Fetch(x => x.Property.PropertyN).Eager
.Fetch(x => x.Property.PropertyO).Eager
.Fetch(x => x.Property.PropertyP).Eager
.Where(x => x.Id == 5);
//My fingers got tired there are in reality 33 fetches, 29 involve x.Property

query.Clone()
.Fetch(x => x.Property.PropertyN.ListProperty).Eager
.Future();

query.Clone()
.Fetch(x => x.PropertyO.ListProperty).Eager
.Future();

query.Clone()
.Fetch(x => x.PropertyD.ListProperty).Eager
.Future();

query.Clone()
.Fetch(x => x.PropertyH.ListProperty).Eager
.Future();

var results = query.Future().ToList();

That is essentially in pseudo the query we are looking at, if I comment out section of the fetches it builds fine (still slower than other projects) as I uncomment one fetch at a time the build time increases until eventually Visual Studio locks up and eventually never finishes building.

Does anyone have any clue about this at all? I have tried searching the internet but I have completely failed in finding any relevant information, at the moment lazy loading seems my only option. However I would really love an answer to this.

  • 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-17T23:43:11+00:00Added an answer on June 17, 2026 at 11:43 pm

    So, if the problem is that the compiler has a limit on the size of method chains, the solution would (theoretically) be simple:

    var query = QueryOver.Of<DomainObject>();
    query = query.Fetch(x => x.Property).Eager;
    query = query.Fetch(x => x.Property.PropertyA).Eager;
    query = query.Fetch(x => x.Property.PropertyB).Eager;
    query = query.Fetch(x => x.Property.PropertyC).Eager;
    // etc
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hopefully someone can help me with this odd problem. I have a database which
I have an odd problem that I just can't seem to diagnose, and it
This is an odd problem. I have a client object that I am building
I have got odd problem while sending intent with parcelable object. This object has
I have an odd problem...I'm using a documentation generator which generates a lot of
I have an odd problem with Django. I have a set of objects that
So I have a problem that I can not figure out. I am writing
I have an odd problem that I've been beating my head into a wall
I have an odd problem. There are two databases. One has all products in
I have come across a very odd problem in C that I have never

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.