jpa - How to call 'like any' PostgreSQL function in JPQL -
i have next issue: have list of names, based on want filter.the problem have not full names(because i'm receiving them ui), , have, example, array= ['joh', 'michae'].
so, want filter based on array.
i wrote query in postgresql
select * q_ob_person name (array['%Хомяченко%', '%Вартопуз%']);
and want ask how write jpql query gor this.
is there option call postgresql function jpql?
jpa 2.1 allows invocation of sql function using
function(sqlfuncname, sqlargs)
so something like (note never tried refer to, play around it)
function("like", function("any", arrayfield))
obviously invoking sql functions specific particular rdbms lose database independence (in case that's of importance).
Comments
Post a Comment