How can I map an interface to a concrete class?

13 views
Skip to first unread message

Riderman Sousa

unread,
May 20, 2013, 1:59:33 PM5/20/13
to Fluent NHibernate Group
First I am using AutoMappings and not FluentMappings, for this reason.

I have a class with a property that is an interface:
Example
: public virtual IUser CreateBy { get; set; }
Concret
class:
Several classes of my domain
implements IAuditable class
. I need a way to map all

I created a convention for classes that implement IAuditable with this configuration.

Test Name: {OMITED}
Test FullName: {OMITED}
Test Source: {PATH OMITED}.Integration.Test\UsuarioTest.cs : line 17
Test Outcome: Failed
Test Duration: 0:00:00,849699

Result Message:
Initialization method {OMITED} Integration.Test.UsuarioTest.SetUp threw exception. FluentNHibernate.Cfg.FluentConfigurationException: FluentNHibernate.Cfg.FluentConfigurationException: An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.

 ---> NHibernate.MappingException: An association from the table CheckListItem refers to an unmapped class: BindSolution.Framework.Domain.IUser.
Result StackTrace: {OMITED }

Thanks.

Riderman de Sousa Barbosa

Web Developer | MCPD Certify

Skype.: 4042-6002 | Cel.: (31) 8681-1986

bindsolution.com
Microsoft Parner Network

Reply all
Reply to author
Forward
0 new messages