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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:09:05+00:00 2026-06-18T10:09:05+00:00

I am trying to pull out a complete object graph using 3 queries and

  • 0

I am trying to pull out a complete object graph using 3 queries and futures to batch the 3 calls.

Here is a cut down version of my object graph.

public class Talent
{
    public virtual int Id { get; set; }
    public virtual string FirstName { get; set; }
    public virtual string LastName { get; set; }
    public virtual string Slug { get; set; }
    public virtual IList<Credit> Credits { get; set; }
    public virtual IList<Show> Creations { get; set; }
}

The Talent query is able to work out how to get the Creators

However the credits don’t, I can see another SQL query being generated to fetch this data again.
Here are the queries.

//Selectes the root node
var talentQuery = session.QueryOver<Filmslave.Domain.Models.Talent>()
                    .Where(t => t.Slug == slug)
                    .Take(1)
                    .Future();

//Fills Talent.Creations
var creationsQuery = session.QueryOver<Filmslave.Domain.Models.Creator>()
                    .Fetch(c => c.Shows).Eager
                    .JoinQueryOver(c => c.Talent).Where(t => t.Slug == slug)
                    .Future();

//Fills Talent.Credits
var creditsQuery = session.QueryOver<Filmslave.Domain.Models.Credit>()
                    .Fetch(c => c.Role).Eager
                    .Fetch(c => c.Episode).Eager
                    .JoinQueryOver(c => c.Talent).Where(t => t.Slug == slug)
                    .Future();

talent = talentQuery.FirstOrDefault();

How do I get the talent to pick up it’s credits?

  • 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-18T10:09:06+00:00Added an answer on June 18, 2026 at 10:09 am

    It should work like that, but I’ve also found eager loading relationships using the inverse to be problematic. If you invert the query it should work:

    var creditsQuery = session.QueryOver<Filmslave.Domain.Models.Talent>()
                    .Where(t => t.Slug == slug)
                    .Fetch(t => t.Credits).Eager
                    .Fetch(t => t.Credits[0].Role).Eager
                    .Fetch(t => t.Credits[0].Episode).Eager                    
                    .Future();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to complete a regular expression that will pull out matches based on
I'm trying to pull some data out of logs on remote machines using awk,
Here is the basic XSL. I am trying to pull out the element q_DECISION_NUMBER
I'm trying to pull out the dc:title element using an xpath. I can pull
Trying to pull out simple authentication, gives me endless loop. strangest thing, when using
I am using/learning Spring 3.1. I'm trying to pull Strings out of *.properties file.
I'm trying to pull out an object from a DbSet with a Linq query.
I'm trying to pull out sub-string from a string using java.Util.Scan The sub-string is
I'm trying to pull out the sales totals for quarter 1. I can't seem
I am trying to pull out data from the table I had from the

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.