Description
Don't have a unit test to prove it yet, so this is just based on the code review of JdbcPkGenerator and its inner class PkRetrieveProcessor:
protected long longPkFromDatabase(DataNode node, DbEntity entity) throws Exception
{ ... PkRetrieveProcessor observer = new PkRetrieveProcessor(entity.getName()); node.performQueries(queries, observer); return observer.getId(); }final class PkRetrieveProcessor implements OperationObserver {
Number id;
....
public int getId() {
if (id == null)
return id.intValue();
}
This only affects those few DBs that do not override 'longPkFromDatabase' (H2 and HSQLDB?)