diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/instantiation/InstantiationWithGenericsTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/instantiation/InstantiationWithGenericsTest.java index 3554566f04..d1c93a9d5c 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/instantiation/InstantiationWithGenericsTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/instantiation/InstantiationWithGenericsTest.java @@ -45,6 +45,15 @@ public class InstantiationWithGenericsTest { .containsExactly( 1L, "entity_1" ) ); } + @Test + public void testImplicitConstructor(SessionFactoryScope scope) { + scope.inTransaction( session -> assertThat( session.createQuery( + "select e.id, e.data from ConcreteEntity e", + ConstructorDto.class + ).getSingleResult() ).extracting( ConstructorDto::getId, ConstructorDto::getData ) + .containsExactly( 1L, "entity_1" ) ); + } + @Test public void testInjection(SessionFactoryScope scope) { scope.inTransaction( session -> assertThat( session.createQuery(