开发者

Workaround for NHibernate DB2 inexact query bug?

开发者 https://www.devze.com 2023-02-22 04:40 出处:网络
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))

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

精彩评论

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