Hibernate executeUpdate() for insert or update native query with returning * gives and exception and also does not update the tables.
SQLQuery query = session.createSQLQuery(
"INSERT INTO public.account (username) VALUES ('xx'), ('yy'), ('zz') RETURNING user_id");
Transaction tx = session.beginTransaction();
query.executeUpdate();
tx.commit();
Exception:
org.postgresql.util.PSQLException: A result was returned when none was expected.