开发者

NHibernate - use WHERE clause on one-to-one mapping

开发者 https://www.devze.com 2023-02-23 02:51 出处:网络
Is it possible to somehow restrict a one-to-one mapping with 开发者_JAVA技巧a constraint other than property ref? Ideally, something along the lines of the class definition, for example, where you can

Is it possible to somehow restrict a one-to-one mapping with 开发者_JAVA技巧a constraint other than property ref? Ideally, something along the lines of the class definition, for example, where you can add where="Condition=Value".

Thanks


You can use nhibernate filters for this: http://nhibernate.info/blogs/nhibernate/archive/2009/05/04/nhibernate-filters.aspx

0

精彩评论

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