문제

I am using Hibernate and want to query multiple entities using a composite index (a,b,c,d). The SQL statement could look like this:

SELECT *
FROM my_table
WHERE a = 2 AND b = '2001' AND c = 'xx' AND d = 23
OR a = 2 AND b = '2002' AND c = 'xx' AND d = 23
-- OR ...
;

Is there a chance to pass hibernate just a list for such a query? What I don't want is to use a StringBuffer to concatenate a statement depending on the length of my list.

도움이 되었습니까?

해결책

Criterai it´s the best for this tutorial

I hope help you

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top