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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -