开发者

IgnoreProperty and Reveal.Member on Fluent NHibernate 1.1.0.685 on component type

开发者 https://www.devze.com 2023-01-15 09:48 出处:网络
I\'m trying to ignore the property which is a ReadOnlyCollection and map the private property. I\'m getting the following error:

I'm trying to ignore the property which is a ReadOnlyCollection and map the private property. I'm getting the following error:

Could not find a setter for property 'MyCo开发者_如何学Cllection' in class 'Project.Core.MyClass'

This is the automapper for that class which is a component.

mapping.IgnoreProperty(x => x.MyCollection);
mapping.HasMany<CollectionObject>(Reveal.Member<MyClass>("myCollection")).Cascade.SaveUpdate();

Hope someone can help me on this one.

0

精彩评论

暂无评论...
验证码 换一张
取 消