HHH-15900 Fix trigger creation on PG10+HANA and check version in OracleDialect to support insert returning generated keys

This commit is contained in:
Marco Belladelli 2022-12-21 11:35:47 +01:00 committed by Christian Beikov
parent 99186e1a37
commit 693d053deb
3 changed files with 7 additions and 3 deletions

View File

@ -326,7 +326,7 @@ public class OracleDialect extends Dialect {
@Override
public boolean supportsInsertReturningGeneratedKeys() {
return true;
return getVersion().isSameOrAfter( 12 );
}
/**

View File

@ -34,7 +34,9 @@
$$
language plpgsql;
create or replace trigger t_i_my_entity
drop trigger if exists my_entity_trigger on my_entity;
create trigger my_entity_trigger
before insert on my_entity
for each row
execute procedure gen_id_my_entity();]]>

View File

@ -36,7 +36,9 @@
$$
language plpgsql;
create or replace trigger my_entity_trigger
drop trigger if exists my_entity_trigger on my_entity;
create trigger my_entity_trigger
before insert on my_entity
for each row
execute procedure gen_id_my_entity();]]>