Frage

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.

War es hilfreich?

Lösung

Criterai it´s the best for this tutorial

I hope help you

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top