`GeneratedIdColumnHbmTests#testNativeId()` fails with an assertion error.
This is caused by `entityBinding.getPrimaryTable().getPrimaryKey().getColumns().get( 0 ).isIdentity()` returning false, which is should return true.
The only place the column.isIdentity() is set true is in `org.hibernate.metamodel.internal.Binder#bindIdentifierGenerator(line 1491)`. And this is based upon if the `entityIdentifier.getIdentifierGenerator()`, which in turn delegates to `Dialect#getNativeIdentifierGeneratorClass()`, which returns an IdentityGenerator.class
The problem here is that a dialect can support IDENTITY column, but not use (or return) IdentityGenerator from the getNativeIdentifierClass().
FoundationdDB SQL layer supports both IDENTITY and sequences (the dialect is under construction, as does the PostgreSQLDialect.
The core of the problem is the test in bindIdentifierGenerator(line 1481), which assumes the IdentityGenerator is the only way to get a primary key identity column. PostgreSQL dialect (and FoundationDB SQL Layer) use a derivation of `org.hibernate.id.SequenceGenerator` to create their identity column IDs.
|