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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:21:53+00:00 2026-05-26T16:21:53+00:00

I have this ASP.NET MVC3 code that’s powered by Spring and Fluent NHibernate (NHIB

  • 0

I have this ASP.NET MVC3 code that’s powered by Spring and Fluent NHibernate (NHIB 3.1)

I have this error:

could not resolve property: User.Full_Name of: Harrods.Core.Entities.Teacher

[QueryException: could not resolve property: User.Full_Name of: Harrods.Core.Entities.Teacher]
NHibernate.Persister.Entity.AbstractPropertyMapping.GetColumns(String propertyName) +104
NHibernate.Persister.Entity.AbstractPropertyMapping.ToColumns(String alias, String propertyName) +57
NHibernate.Persister.Entity.BasicEntityPropertyMapping.ToColumns(String alias, String propertyName) +100
NHibernate.Persister.Entity.AbstractEntityPersister.ToColumns(String alias, String propertyName) +53
NHibernate.Loader.Criteria.CriteriaQueryTranslator.GetColumns(ICriteria subcriteria, String propertyName) +184
NHibernate.Loader.Criteria.CriteriaQueryTranslator.GetColumnsUsingProjection(ICriteria subcriteria, String propertyName) +134
NHibernate.Criterion.CriterionUtil.GetColumnNamesUsingPropertyName(ICriteriaQuery criteriaQuery, ICriteria criteria, String propertyName) +45
NHibernate.Criterion.CriterionUtil.GetColumnNames(String propertyName, IProjection projection, ICriteriaQuery criteriaQuery, ICriteria criteria, IDictionary`2 enabledFilters) +46
NHibernate.Criterion.InsensitiveLikeExpression.ToSqlString(ICriteria criteria, ICriteriaQuery criteriaQuery, IDictionary`2 enabledFilters) +101
NHibernate.Loader.Criteria.CriteriaQueryTranslator.GetWhereCondition(IDictionary`2 enabledFilters) +298
NHibernate.Loader.Criteria.CriteriaJoinWalker..ctor(IOuterJoinLoadable persister, CriteriaQueryTranslator translator, ISessionFactoryImplementor factory, ICriteria criteria, String rootEntityName, IDictionary`2 enabledFilters) +447
NHibernate.Loader.Criteria.CriteriaLoader..ctor(IOuterJoinLoadable persister, ISessionFactoryImplementor factory, CriteriaImpl rootCriteria, String rootEntityName, IDictionary`2 enabledFilters) +175
NHibernate.Impl.SessionImpl.List(CriteriaImpl criteria, IList results) +412
NHibernate.Impl.CriteriaImpl.List(IList results) +80
NHibernate.Impl.CriteriaImpl.List() +104
NHibernate.Criterion.QueryOver`1.List() +96
NHibernate.Criterion.QueryOver`1.NHibernate.IQueryOver<TRoot>.List() +75

This is the code that the problem seems to be coming from:

return session.QueryOver<Teacher>()
                    .Where(x => x.User.Full_Name.IsInsensitiveLike("%" + Search + "%"))
                    .OrderBy(x => x.Id).Asc
                    .Skip((skip - 1) * take)
                    .Take(take)
                    .List<Teacher>();

My Teacher class looks like this:

[Serializable]
public class Teacher
{

    public virtual User User { get; set; }
}

And my User class looks something like this:

public class User : BaseEntity<User>
{

    public virtual string Email { get; set; }
    public virtual string Full_Name { get; set; }
}

Not sure what’s giving the problem. Everything looks okay to me. Anyone have any ideas whats wrong? 🙂

Not sure but they look somewhat similar, but don’t really understand how to solve anyway:

NHibernate.QueryException with dynamic-component
A correct way to load entities by Id list when Id is not mapped

EDIT:
Tried this, but still giving the same error:-

return session.QueryOver<Teacher>()
                    .JoinQueryOver<User>(u => u.User)
                    .Where(x => x.Full_Name.IsInsensitiveLike("%" + FullNameSearchFilter + "%"))
                    .OrderBy(x => x.Id).Asc
                    .Skip((skip - 1) * take)
                    .Take(take)
                    .List<Teacher>();

Tried alias as well..:

return session.QueryOver<Teacher>()
                    .JoinAlias(() => ML.User, () => U)
                    .Where(() => U.Full_Name.IsInsensitiveLike("%" + FullNameSearchFilter + "%"))
                    .OrderBy(x => x.Id).Asc
                    .Skip((skip - 1) * take)
                    .Take(take)
                    .List<Teacher>();

Neither working!

EDIT 2

the sql codes is being showed correctly; I can verify this via my NHibernate Profiler. But for some reason once the data has been loaded, it pops the error and the transaction is rolled back. Now it appears to me that this is no longer just about queryover?

  • 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-26T16:21:54+00:00Added an answer on May 26, 2026 at 4:21 pm

    You’ll have to use a JoinQueryOver or JoinAlias to accomplish what you are asking for.

    What is the difference between JoinQueryOver and JoinAlias?

    Take a look at sections Associations and Aliases in this article: http://nhforge.org/blogs/nhibernate/archive/2009/12/17/queryover-in-nh-3-0.aspx

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

Sidebar

Related Questions

With ASP .NET MVC3. In my controller I have this portion of code MasterMindDnetEntities
I have a website (ASP.NET MVC3) that runs on IIS 7. From this website,
I have some C# code in my ASP.NET MVC3 project that's throwing an exception
ASP.Net MVC3 is cool and all but I have this question more out of
This is about asp.net mvc3 web application. We have used Object cache to store
In an ASP.NET MVC3 project I have a structure like this: Core.csproj -> 3rdparty1.dll
So I have this ASP.Net 2.0 website that uses functions contained within a JS
I am working on a asp.net mvc3 application. I have this Jquery function function
I have ASP.NET MVC3 project and I am writing some extension methods that returns
I have develop small Asp.net MVC3 application using Telerik rad Controls with in that

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.