mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-17 00:24:57 +00:00
HHH-17076 - Numeric literal typing
This commit is contained in:
parent
ca3258b317
commit
f1fa09ab42
@ -121,7 +121,7 @@ private Expression convertedArgument(DurationUnit field, TemporalUnit unit, Expr
|
||||
|
||||
private TemporalUnit bestTemporalUnit(Expression magnitude, DurationUnit field) {
|
||||
final JdbcType jdbcType = magnitude.getExpressionType().getSingleJdbcMapping().getJdbcType();
|
||||
if ( jdbcType.isFloat() || jdbcType.isDecimal() ) {
|
||||
if ( jdbcType.isFloat() ) {
|
||||
// We need to multiply the magnitude by the conversion factor and cast to int
|
||||
// Use second by default and nanosecond if we encounter fractional seconds
|
||||
return field.getUnit() == TemporalUnit.SECOND
|
||||
|
Loading…
x
Reference in New Issue
Block a user