diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/sql/exec/HqlUpdateExecutionTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/exec/HqlUpdateExecutionTests.java index 5f1fdf268e..52d3954d7a 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/sql/exec/HqlUpdateExecutionTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/exec/HqlUpdateExecutionTests.java @@ -58,6 +58,18 @@ public class HqlUpdateExecutionTests { ); } + @Test + @TestForIssue( jiraKey = "HHH-15939" ) + public void testNumericUpdate(SessionFactoryScope scope) { + scope.inTransaction( session -> { + session.createMutationQuery( "update EntityOfBasics set theShort = 69" ) + .executeUpdate(); + session.createMutationQuery( "update EntityOfBasics set theShort = ?1" ) + .setParameter( 1, 69 ) + .executeUpdate(); + } ); + } + @Test public void testSimpleUpdateWithData(SessionFactoryScope scope) { scope.inTransaction( diff --git a/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/gambit/EntityOfBasics.java b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/gambit/EntityOfBasics.java index c66d568303..2fd9afd4f9 100644 --- a/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/gambit/EntityOfBasics.java +++ b/hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/gambit/EntityOfBasics.java @@ -55,6 +55,7 @@ public class EntityOfBasics { private String theString; private Integer theInteger; private int theInt; + private short theShort; private double theDouble; private URL theUrl; private Clob theClob; @@ -116,6 +117,14 @@ public class EntityOfBasics { this.theInt = theInt; } + public short getTheShort() { + return theShort; + } + + public void setTheShort(short theShort) { + this.theShort = theShort; + } + public double getTheDouble() { return theDouble; }