I have a table member where party is one of the column of type jsonb. jsonb structure looks as below:
{
"PE": [ "fefe046d-774d-4e8b-a74c-99c89e98a96f",
"720bfde7-a8c0-404f-b746-d6929c9b1109",
"409cc84a-a473-4945-9ec0-c09a2ae96395" ],
"TE": []
}
I have written a query as below in native SQL, how to write the same query using jpa criteria?
select distinct id from public.member,jsonb_array_elements_text(party-> 'PE') where value in ('fefe046d-774d-4e8b-a74c-99c89e98a96f','409cc84a-a473-4945-9ec0-c09a2ae96395')
Your response at the earliest would be appreciated.