开发者

Workaround for NHibernate DB2 inexact query bug?

Do开发者_如何学Ces anyone know a workaround for NH-2436?

Basically, when you concatenate a parameter in the case of (% || ? || %) DB2 requires it to be cast as in CAST((% || ? || %) AS VARCHAR(255)) which NHibernate does not do, otherwise an exception is thrown.

Is there some way to work around this and do a parameter based LIKE query using NHibernate against DB2?


Well, if you throw fluentNhibernate, Linq, and automapping out the window I was able to work around this with a named query.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜