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

Popular posts from this blog

symfony - TEST environment only: The database schema is not in sync with the current mapping file -

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -