Why is the Hibernate default generator for PostgreSql "SequenceGenerator", not "IdentityGenerator"?
Maybe because afterInsert generators are generally broken for PG in NHibernate because it uses OracleStyle out-parameter style which is not supported by npgsql-ADONET driver which returns the result as query result and not out parameter.
SQL: INSERT INTO .... returning id into nhoutparameter; :nhoutparameter = null;
using Oracle this works
command.Execute();
object id = command.Parameter["nhoutparameter"].Value;
Assert.NotNull(id);
in PG not. It should be
object id = command.ExecuteScalar();