sql - SpringData jparepository AND / OR operators -


i need jparepository:

 select * table (   propertytwo '%something%'   or propertythree '%something%'   or propertyfour  '%something%' ) , propertyone in (a,b); 

i this:

 findbypropertyoneinandpropertytwocontainingorpropertythreecontainingorpropertyfourcontaining(list param1, string param2, string param3, string param4) 

but method this:

 select * table   propertytwo '%something%'   or propertythree '%something%'   or propertyfour  '%something%'   , propertyone in (a,b); 

which different first sql query above.

how can achieve correct result?

like slava said, should do:

@query("from table t t.propertyone in :param1 , (t.propertytwo :param2 or t.propertythree :param3 or t.propertyfour :param4)") list<table> findbyparams(@param("param1") list<string> param1, @param("param2") string param2, @param("param3") string param3, @param("param4") string param4); 

Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -