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

  • Home
  • SEARCH
  • 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 8248473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:12:01+00:00 2026-06-07T23:12:01+00:00

I have some classes that implement a generic base type. i.e: public class TreeItem<TEntity>

  • 0

I have some classes that implement a generic base type. i.e:

public class TreeItem<TEntity> : Entity
where TEntity : TreeItem<TEntity>
{
    public virtual IList<TEntity> Children{get;set;}
    public virtual TEntity Parent {get;set;}
}

public class Category : TreeItem<Category>
{
    public virtual string Description{get;set;}
}

...

When using Automapping and building the mappings, FluentNHibernate throws an exception saying “Association references unmapped class”. Is using a generic base type incompatible with NHibernate? (I don’t map TreeItem<> in my mapping).

  • 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-07T23:12:02+00:00Added an answer on June 7, 2026 at 11:12 pm

    IgnoreBase(typeof(TreeItem<>)) Takes care of this.

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

Sidebar

Related Questions

I'm looking at some Java classes that have the following form: public abstract class
I am trying to have a List of classes that implement a generic class
I have an interface, and some classes that inherit from it. public interface IFoo
I have a class that does some generic code for Writing to a Database.
I have a few generic classes that implement a common non-generic interface. I create
I have a base-class called Element. Some other classes (like Label and Image) both
I have some classes that all implement the same Java interface, which essentially allows
I have implemented PullRefreshTableViewController with some classes that take no delegates, and it works
I have some classes that are used for Styling and all of them display
I have some classes that represent immutable objects (Quantity, Price, Probability). Is there some

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.