Hi guys,
i'm using hibernate without spring, i have the following function defined in PG:
Code:
CREATE OR REPLACE FUNCTION store_tmp_pct_bv() RETURNS void AS
$$
BEGIN
update public."pct_bv" set c_pct_prelev_sout=data.c_pct_prelev_sout
from
(SELECT id_bv,id_demande,c_pct_prelev_sout FROM public.v_tmp_pct_bv
) as data
where data.id_bv="pct_bv"."id_bv"
and data.id_demande= "pct_bv"."id_demande" ;
END;
$$ LANGUAGE plpgsql
in my java code i use the following to execte the function:
Code:
Integer result= getSession().createSQLQuery(" select public.store_tmp_pct_bv() ").executeUpdate();
but i got the following exception:
Code:
org.hibernate.exception.GenericJDBCException: could not execute native bulk manipulation query
and thanks for your help