From 0381da76b9c6421d83d108c607e34f41669b2d58 Mon Sep 17 00:00:00 2001 From: gavinking Date: Sun, 16 Feb 2020 01:25:49 +0100 Subject: [PATCH] Test for insert values --- .../orm/test/query/hql/InsertUpdateTests.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/InsertUpdateTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/InsertUpdateTests.java index 01cc990d93..95611de009 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/InsertUpdateTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/InsertUpdateTests.java @@ -43,6 +43,17 @@ public class InsertUpdateTests { ); } + @Test + public void testInsertValues(SessionFactoryScope scope) { + scope.inTransaction( + session -> { + session.createQuery("delete from Ticket").executeUpdate(); + session.createQuery("insert into Ticket (id, key, subject, details) values (6, 'ABC123', 'Outage', 'Something is broken')").executeUpdate(); + session.createQuery("insert into Ticket (id, key, subject, details) values (2, 'XYZ123', 'Outage', 'Something is broken'), (13, 'HIJ456', 'x', 'x')").executeUpdate(); + } + ); + } + @Test public void testInsertSelect(SessionFactoryScope scope) { scope.inTransaction(