Open haashem opened 11 years ago
I'll take a look. First of all - are you sure that "yield return this" makes sense?
Can you try replacing this line:
.Mappings(m => m.AutoMappings.Add(CreateMappings()))
for these ones:
.Mappings(m =>
{
m.FluentMappings.AddFromAssemblyOf
Markdown ate template argument - I meant AddFromAssemblyOf[SoldierMap]
Soldier is a combat element and when I iterating through combat element if that element is a soldier it should return soldier, so yield return this is correct. as you mentioned if I use fluent mapping it works well without any error.but when I use automapping I encounter that strange problem. I'm confused how to solve that. I want to solve it with automapping
The reason for an error is that Fluent thinks you didn't provide an Id mapping for Formation type - even after I said that PK is in the Id property
would you explain more? what should I do?
I didn't get the code working yet - will try again today
I have a tree structured model and designed it with composite Pattern. for iterating through the entire hierachy Im using Composite Iteration. here is the source code:
http://www.mediafire.com/download/v78f97mt51y27j6/Fluent-NHibernate-MVC-3_Combat.rar
but when I want to AutoMap the model, I encounter this problem:
but getEnumerator is a method. I don't know why handle this like an Entity!!
here is my AutoMapping Configuration :
Uploaded the sample code:
//////
}
/////////
and here how I create session factory
Does anyone has any idea?