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

The Archive Base Latest Questions

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

I am using Fluent NHibernate in my application. I have a criteria query that

  • 0

I am using Fluent NHibernate in my application.
I have a criteria query that looks like this –

var query = DetachedCriteria
                .For<table2>()
                .SetProjection(Projections.Distinct(Projections.Property("id")))
                //.Add(Restrictions.Between("date_field", startDate, endDate))
                .Add(Restrictions.Eq("id", 204010));

            Add(Subqueries.In("id", query));

This errors out with the error –

NHibernate.ADOException was unhandled
Message=could not execute query

I looked at the query and tried to run it, but it also errored out. I then noticed that in the subquery, the table name for table2 is in quotes. I removed these quotes and the query ran fine.
Does anyone know how I can get rid of the quotes in my criteria?

thanks for any thoughts

  • 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-20T16:31:14+00:00Added an answer on May 20, 2026 at 4:31 pm

    I found the answer – I had my entities set up to have capital first letters, but in the database they don’t have caps. The quotes in the table name make the RDBMS look at the table names with case sensitivity. So I changed my entities to be all lower case, and the query works. Thanks

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

Sidebar

Related Questions

I have a WPF Application using Fluent NHibernate 1.0 RTM and System.Data.SQLite 1.0.65 that
I have this administration site that is using (Fluent) NHibernate for data access. As
I have created an small application, in which I'm using Fluent Nhibernate. Application run
I have an application using NHibernate and I'm using Fluent NHibernate to mapping my
I'm using Fluent NHibernate in an Asp.net MVC application. I have it set up
I have an application using Fluent NHibernate on the server side to configure the
I'm trying to get logging enabled on my application using Fluent NHibernate and log4net.
I'm working on an intranet MVC web application, using Fluent NHibernate. As everyone knows,
If using Fluent NHibernate, is it possible to automap most classes, but specify that
I'm using Fluent NHibernate, and auto-mapping the classes. I have a computed property in

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.