2011-04-30 4 views
1

NH 2.1/Fluent 1.1에서 NH 3.1/Fluent 1.2로 업그레이드되었습니다. 나는 Linfu를 프록시로 사용하고 있었지만 업그레이드 후에 NH가 Castle을로드하려고 시도 할 때마다 구성했습니다. 임 설정 유창함 또한 linfu를 사용하는 nhibernate.cfg 구성되어프록시 속성을 무시한 NHibernate

Configuration _Configuration; 
FluentConfiguration _FluentConfig; 
_Configuration = new Configuration(); 
_Configuration.Configure(); 
_FluentConfig = Fluently.Configure(_Configuration) 
.Mappings(m => m.FluentMappings.AddFromAssemblyOf<FluentNHSession>())) 

를 사용하여 :

<property name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu</property> 

예외가이 성 DLL의의를 찾을 수 없습니다 말을 제기하는 응용 프로그램을 실행할 수 있습니다. 동일한 nhibernate.cfg를 사용하지만 bin 디렉토리에 성 ddl을 삭제하면 NH가 구성을 무시하는 것처럼 보입니다.

답변

1

같은 문제가있었습니다. 나는 유창한 구성으로이 라인을 포함시킴으로써 그것을 해결했다.

sessionFactory = Fluently.Configure(normalConfig) 
       .Mappings(m => 
        m.FluentMappings 
        .AddFromAssemblyOf<OrderHeaderMap>() 
        .Conventions.AddFromAssemblyOf<PascalCaseColumnNameConvention>()) 
       .ProxyFactoryFactory("NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu") 
       .BuildSessionFactory(); 

이 답변이나 다른 답변이 도움이된다면 체크 표시를 클릭하여 답을 표시하십시오.

+0

이것이 올바른지 확실하지 않습니다. 'ProxyFactoryFactory'는'Database'를 호출 할 때에 만 존재합니다. 따라서 Fluently.Configure(). Database (MsSqlConfiguration.MsSql2008.ConnectionString ("connstring"). ProxyFactoryFactory (""))'가 작동합니다. – Kezzer

관련 문제