NHibernate 代理验证器 2.1 中的更改
有人可以帮助我理解以下内容:
在以前的 NHibernate 版本(2.0.1)中,以下属性将 验证并与 Castle 代理兼容:
internal virtual BusinessObject Parent
{
get { /*code*/ }
}
但是,在 2.1 中,它错误地指出类型应该是 “公共/受保护的虚拟”或“受保护的内部虚拟”。 我对此有疑问,因为将财产标记为“受保护” 内部'将该属性公开给其他程序集中的继承类型 (有效保护或内部)。鉴于这从来都不是 之前的要求,感觉强加的要求有点不好 现在。
有人可以解释一下为什么现在有这个要求以及什么吗 它试图强制执行,所以我至少可以理解它是什么 意图实现。
如果这个限制不是完全需要的,并且我百分百确定 这些类型的属性永远不会映射到我所在的数据库属性 打算使用 Castle 创建我自己的 Mashup ByteCode 提供程序 从 2.0.1 开始,代理工厂和类型验证器。不过,我绝对愿意接受任何建议。
Can someone please help me understand the following:
In the previous version of NHibernate (2.0.1) the following property will
validate and is compatible with the Castle Proxies:
internal virtual BusinessObject Parent
{
get { /*code*/ }
}
However, in 2.1 it errors saying that the types should be
'public/protected virtual' or 'protected internal virtual'.
I have issues with this because marking a property with 'protected
internal' exposes the property to inherited types in OTHER assemblies
(effectively protected OR internal). Given that this was never a
requirement before, it feels like a bit of a bad requirement to impose
now.
Can someone please explain why this requirement is now there and what
it is trying to enforce so I can at least understand what it is
intending to achieve.
If this restriction is not entirely needed, and I am 100% certain
these types of properties will NEVER map to DB properties I am
intending to create my own Mashup ByteCode provider using the Castle
proxy factory and the Type Validator from 2.0.1. However, I'm definitely open to any advice.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是更改 和 这是此更改的原因。据报道,它正在破坏代理行为。
Here's the change and here's the reason for that change. According to the report, it was breaking proxy behavior.