2009-09-11 2 views

답변

20
Fluently.Configure() 
.Database(
     SQLiteConfiguration.Standard 
     .InMemory) 
     .Mappings(m => m.AutoMappings 
      .Add(AutoMap.AssemblyOf<_Field>())) 
     .Conventions 
      .Add(FluentNHibernate.Conventions.Helpers.DefaultLazy.Never()) 
     .BuildSessionFactory(); 
+3

내가 틀렸다면 여기에 8 개의 왼쪽 괄호가 있고 7 개의 오른쪽 괄호가 있습니다. – Ken

13

당신과 시도 할 수 있습니다. 이처럼

+0

내가했기 때문에 당신이 그것을 시도 ... 그리고 그것은 나를 위해 일한 –

+0

을 작동하지 않았다. 객체 참조가 객체와 함께로드되기를 원했고 이렇게했습니다. –

+0

그것은 우리에게도 효과가있었습니다. 우리의 매핑은 HasMany (e => e.Children) .KeyColumnNames.Add ("ParentId") .Cascade.AllDeleteOrphan(). Not.LazyLoad(); – Peter

5

:

References(x => x.Something).Not.LazyLoad(); 
관련 문제