HHH-18218 - Added test case not using explicit constructor new ConstructorDto(...)
This commit is contained in:
parent
742fc4c60a
commit
f63f15bb4f
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue