HHH-15939 test for fixed issue

This commit is contained in:
Gavin King 2023-07-24 18:10:43 +02:00
parent 05de3e487b
commit 7effc40e13
2 changed files with 21 additions and 0 deletions

View File

@ -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(

View File

@ -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;
}