在Hibernate中使用 case when then else end 的问题
SELECT
CreateTime,
TypeId
FROM
T805.dbo.salSalesOrder
WHERE
BizPartnerId = '20509596'
AND CreateTime >= CASE
WHEN TypeId = 'SO' THEN
?
ELSE
?
END
AND CreateTime <= CASE
WHEN TypeId = 'SO' THEN
?
ELSE
?
END;
报错 : org.hibernate.QueryException: Could not determine data type for simple case statement 不能确定数据类型。
直接SQL拼接 可以运行 求大神解救方法