We're updating the issue view to help you get more done. 

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

Time Tracking

30m

Components

Affects versions

3.6.0.CR1

Priority

Minor