Need method Dialect to apply hibernate type over-rides.

Description

There is currently no way to register hibernate type over-rides simply by extending the Dialect object.
This forces applications to inject custom bootstrapping code, where a simple property change (the dialect) would suffice.
This could be easily overcome by having the SessionFactory interrogate the dialect to see if it contains any substitutions.

public class SessionFactoryImpl {
public SessionFactoryImpl(...) {
if (getDialect().getTypeOverrides() != null) {
for (BasicType overrideType : getDialect().getTypeOverrides())
cfg.registerTypeOverride(overrideType);
}
}
}

public abstract class Dialect {
// basic implementation,
public List<BasicType> getTypeOverrides() {
return null;
}
}

Environment

3.6.0.CR1, postgresql

Status

Assignee

Unassigned

Reporter

Justin Sands

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

3.6.0.CR1

Priority

Minor