views:

713

answers:

1

I have a Person class in 1 project/dll and a StandardUser class that derives from Person in another project/dll. I have a Password class that contains a StandardUser (Password and StandardUser are in the same dll).

I can't seem to get the fluent automapping to work with this scenario.

It tells me: NHibernate.MappingException: An association from the table Password refers to an unmapped class: DomainModel.Users.DomainObjects.StandardUser

If I move the Person class to the same dll as StandardUser, then it works. It also works if Password contains a Person instead of a StandardUser.

Am I missing something or is this not supported with Fluent Automappings?


Edit/Answer: It appears that you have to map the StandardUser's assembly in the AutoMappings.Add BEFORE you map the base class. I'm not sure if this is by design or a bug.

+2  A: 

It appears that you have to map the StandardUser's assembly in the AutoMappings.Add BEFORE you map the base class. I'm not sure if this is by design or a bug.

NotDan
This most definitely is a bug, thanks for pointing it out. Glad you've got a workaround though.
James Gregory