Search code examples
fluent-nhibernateautomapping

Exception in Automapping and FNH in BuildSessionFactory Line


i am using the latest version of automapping and FNH with vs2008, i got this exception "Tried to add property 'Description' when already added"

first , the exception is not informative! i cannot find out which class cause this error.

secondly, how can i solve this problem ? is it because of an abstract 'description' property i have ?


Solution

  • If it's an abstract property that you don't intend to map to the database you might want to add an Ignore to that property in your automapping override.

     mapping.IgnoreProperty(x => x.Description);