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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:03:09+00:00 2026-05-22T12:03:09+00:00

How can I get NHibernate to hook up child objects automatically or bulk load

  • 0

How can I get NHibernate to hook up child objects automatically or bulk load children rather than lazy loading for each parent?

I have a large number of parent objects all of the same type. Each of them has two bags of child objects. As I need to load all the parents and children objects as quickly as possible, I use NHibernate to load all the objects and then loop all child objects and add them to relevant parent in code. I’m sure NHibernate has a much better way of doing this – but what is it?

  • 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-22T12:03:10+00:00Added an answer on May 22, 2026 at 12:03 pm

    You can always use eager loading behavior of NHibernate to override its default behavior (Lazy Loading).
    Here is an article that discuss lazy loading and eagerly loading

    Take a look at the “Eagerly loading with HQL” part that shows how you can use HQL to eagerly load an object graph.

    However using eager loading can have a negative impact on performance specially if you are working with a lot of objects.

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

Sidebar

Related Questions

I have two objects: Color and Palette. Each palette can get a range of
I can't get NHibernate to delete this child object, it completes without throwing any
How can I get specific number of records from nhibernate like 10 or 15
How can I get the following test to pass with NHibernate? I thought it
I am trying to get Fluent nHibernate to generate mappings so I can take
I'm having a problem with Fluent NHibernate mappings, I think, and can't quite get
This is an oddball question I figure. Can I get NHibernate to ask SQL
I'm trying to adopt Fluent NHibernate with my project, currently I can get data
I am not new to nhibernate, but I can't get it to save/update a
Is there any way I can get NHibernate to use the READPAST hint when

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.