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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T02:38:19+00:00 2026-05-15T02:38:19+00:00

I am currently working on a project using NHiberate as the DAL with .NET

  • 0

I am currently working on a project using NHiberate as the DAL with .NET 2.0 and NHibernate 2.2.

Today I came to a point where I had to join a bunch of entities/collections to get what I want. That is fine.

What got me was that I do not want the query to return a list of objects of a certain entity type but rather the result would include various properties from different entities.

The following query is not what I am doing but it is kind of query that I am talking about here.

select order.id, sum(price.amount), count(item)
from Order as order
    join order.lineItems as item
    join item.product as product,
    Catalog as catalog
    join catalog.prices as price
where order.paid = false
    and order.customer = :customer
    and price.product = product
    and catalog.effectiveDate < sysdate
    and catalog.effectiveDate >= all (
        select cat.effectiveDate
        from Catalog as cat
        where cat.effectiveDate < sysdate
    )
group by order
having sum(price.amount) > :minAmount
order by sum(price.amount) desc

My question is, in this case what type result is supposed to be returned? It is certainly not of type Order, neither is of type LineItems.

Thanks for your help!

John

  • 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-15T02:38:20+00:00Added an answer on May 15, 2026 at 2:38 am

    you can always use List of object[] for returning data and it will work fine.

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

Sidebar

Related Questions

I'm currently working on an ASP.NET MVC project using NHibernate and I need to
I am currently working on a C# project using ASP.NET. And I'd like to
I am currently working on a multi branch desktop based project using VB.NET 2008.
My team is currently working on windows forms project using VB.NET. We are curently
I'm working on a project which currently uses NHibernate 2.1.2, FluentNHibernate 1.1 and Spring.Net
I'm currently working on a project using netbeans 6.9 and grails 1.3. I'm trying
I am currently working on a project that is using Dojo as the js
I am currently working on android project where I am using a custom list
I'm currently working on a project 'email to voice call'. Using python i'v extracted
I am currently working on an Android project. I am using a ListView and

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.