开发者

NHibernate: map a formula in named query issue

I'm new to nhibernate and i'm experiencing this issue: i've a mapping file with this kind of properties derived from a formula

<property name="LanguageCultureName" formula ="CASE NATION WHEN 'I' THEN 'it-IT' ELSE 'en-GB' END" update="false" insert="false"/>开发者_StackOverflow中文版

When I attempt to load entity by id it works as I would expected but when i try to load a list from a named query i receive this error: "value cannot be null. Parameter name: fieldName". If i omit the formulas all work fine.


make sure your named-query result set has the NATION column. otherwise it will certainly fail.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜