I'm building a new dialect for the FoundationDB SQL layer. I've merged
in the recent metamodel merge into my working branch and ran across this
new failure.
GeneratedIdColumnHbmTests#testNativeId() fails with an assertion error.
This is caused by
entityBinding.getPrimaryTable().getPrimaryKey().getColumns().get( 0
).isIdentity() returns 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(), 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, as does
the PostgreSQLDialect.
Is this a bug in Binder? that the test should be better formed to set
the identity column.
Is this a new limitation on Dialects, in that they can no longer
correctly support both IDENTITY and sequences?
What is the correct way to fix this problem?
Show replies by date