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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:45:08+00:00 2026-05-22T23:45:08+00:00

Since upgrading from NH 3.0 to 3.1 I’ve been having some trouble using the

  • 0

Since upgrading from NH 3.0 to 3.1 I’ve been having some trouble using the following code:

 criteria = session.CreateCriteria<User>()
    .Add(SqlExpression.InG<User, int>(user => user.ID, toBeFechted)); // toBefetched is an IList<int>

This will compile fine but when running it I get an exception as soon as I add the In condition to the criteria.

System.MissingMethodException : Method not found: NHibernate.Criterion.AbstractCriterion NHibernate.Criterion.Restrictions.InG(System.String, System.Collections.Generic.ICollection1<**UNKNOWN TYPE**>).
at NHibernate.LambdaExtensions.SqlExpression.InG(Expression
1 expression, ICollection`1 values)

I can rebuild the query using QueryOver instead of Criteria and it will work, but doing that requires digging up alot of code that I don’t have the time to do. Using NH 3.0 I did not have the problem.

Has something changed in NH 3.1 or am I having some weird dll problem?

  • 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-22T23:45:09+00:00Added an answer on May 22, 2026 at 11:45 pm

    If you are using the Googlecode older style NH Lambda Extensions which were built on NH 2.1 assemblies, you have 2 options; – you can downgrade to 3.0 as you have or you can download the sourcecode and compile against the later binaries.

    If you dont want to do this, I have a copy of NHlambdaextensions built against NH3.1, which includes all of the original tests passing to give you some coverage

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

Sidebar

Related Questions

Since upgrading from mvc 2 beta 2 to rc I'm having trouble with an
I've been using LaTeX since 2005 with the TeXLive distribution and I've been upgrading
Okay, so I have some code that worked fine in PHP4 but since upgrading
Since upgrading to the latest Xcode 3.2.1 and Snow Leopard, I've been getting the
Since upgrading a website from ASP.NET 3.5 to ASP.NET 4.0 my dates come out
Since upgrading from 4.7 to ECC6 the ABAP compiler has become a lot stricter
Plenty of pages load since upgrading my site from MVC 1.0 but if I
I have been working on a website using MVC Preview 1 since it came
I am upgrading an application from cakephp 1.3 to 2.0 and running into some
Since upgrading from WAS6.1 to WAS7.0 I'm getting an error when trying to display

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.