English 中文(简体)
1. 建造紧急不动产的自动通道和FNH例外
原标题: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"

首先,这一例外没有提供信息! i 不能发现哪类造成这一错误。

第二,如何解决这一问题? 它是因为抽象描述财产而有的?

最佳回答

如果是你无意向数据库绘制地图的抽象财产,你可能会想在您的汽车中增加该财产的伊格诺里。

 mapping.IgnoreProperty(x => x.Description);
问题回答

我有同样的问题,但在检查地图类别时,出于某种原因,密码生成者对同一财产进行了两次检查,从而导致这一例外被推翻。

As a check list please check your Map file of the entity map class and make sure the mapping is unique to property.

我一去掉了重复。

感谢





相关问题
Does Fluent NHibernate support "trigger-identity"

I posted the question in the Fluent-NHibernate newgroup but so far there has been no answer from the void. Is there a Fluent NHibernate mapping for the NHibernate "trigger-identity" method of ...

automapping nested components naming conventions

Im making the switch from Fluent Mapping to Automapping in my current project. If I have the following domain: public class Matter{ public Client Client{get;set;} } public class Client { ...

NHibernate Search in a List using ICriteria

I have my class X : public class ClassX { public virtual IList<ClassY> ListY { get; set; } ... } My ClassX mapping (using Fluent) ... HasMany<ClassX>(x => x.ListY ) ....

Fluent nHibernate keeps recreating my database, why?

I m trying to convert my data layer from Linq2Sql to nHibernate. I think Xml the configuration in nHibernate is pretty backwards so I m using Fluent. I ve managed to get fluent, add in a repository ...

How to fluent-map this (using fluent nhibernate)?

I have two tables in my database "Styles" and "BannedStyles". They have a reference via the ItemNo. Now styles can be banned per store. So if style x is banned at store Y then its very possible that ...

热门标签