سؤال

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