I have created a postgres composite type and function as follows
CREATE TYPE test AS (a int, b timestamp, c int);
CREATE FUNCTION some_updates(t test[])
begin
// iterate t and perform operation
end
select some_updates(CAST(array[(488,'2019-7-01',342)] AS test[])
The above function and select to call the function works properly.
In spring jpa I would want to call function and pass values for "test[]" as params from native query. However it results in error.
@Query(value="select * from some_updates(:myinput)")
Myclass getDetails(List<test> myinput);
I have created a pojo class test as follows
class test
{
int a;
timestamp b;
int c;
//getters and setters
}
How can i possibly pass values to the postgres function?