I'm using spring-boot-starter-data-jdbc and infobip-spring-data-jdbc-querydsl-boot-starter(5.4.2) together.
In my tests with org.springframework.transaction.annotation.Transactional annotation I have the following code:
@Test
@Transactional
void test() {
repository.save(ReportList.builder().userName("username").build());
var reports = repository.query(query -> query
.select(entityProjection())
.from(QReportList.reportList)
.fetch());
}
Expected result: variable reports is not empty
Actual result: variable reports is empty
If I remove @Transactional (or use default findAll method from QuerydslJdbcRepository) it starts to return results.
Am I doing something wrong?
I'm using spring-boot-starter-data-jdbc and infobip-spring-data-jdbc-querydsl-boot-starter(5.4.2) together.
In my tests with
org.springframework.transaction.annotation.Transactionalannotation I have the following code:Expected result: variable
reportsis not emptyActual result: variable
reportsis emptyIf I remove
@Transactional(or use default findAll method from QuerydslJdbcRepository) it starts to return results.Am I doing something wrong?