Blankman
Blankman

Reputation: 267180

NHibernate.HibernateException: Unable to locate persister: ABC.Interfaces.Entities.IUser

I'm getting this error:

NHibernate.HibernateException: Unable to locate persister: ABC.Interfaces.Entities.IUser

Does this mean the mapping file (I'm using fluent) isn't being found for some reason?

In my nhibernate.data project I have the below definition:

public class UserMap : ClassMap<IUser>
{
    public UserMap()
    {
        Id(x => x.Id);

        Map(x => x.Username);
        Map(x => x.Password);
        Map(x => x.Firstname);
        Map(x => x.Lastname);

        Map(x => x.CreatedDate);
        Map(x => x.UpdatedDate);
    }
}

What is the problem?

Or does it have to do with castle windsor not picking up the implementation?

I have:

 container.Register(Component.For<IUser>().ImplementedBy<User>().LifeStyle.Transient);

Upvotes: 0

Views: 4570

Answers (1)

Iridio
Iridio

Reputation: 9271

Look at this post. It seems that the problem may be in the mapping of IUser in NH

Upvotes: 1

Related Questions