infobip / infobip-spring-data-querydsl

Infobip Spring Data Querydsl provides new functionality that enables the user to leverage the full power of Querydsl API on top of Spring Data repository infrastructure.
Apache License 2.0
278 stars 57 forks source link

`SimpleQuerydslR2dbcFragment` always uses `TransactionalRowsFetchSpec` #79

Closed davin111 closed 1 year ago

davin111 commented 1 year ago

createQuery() of SimpleQuerydslR2dbcFragment returns new TransactionalRowsFetchSpec<>(databaseClient.sql(sql).map(mapper), TransactionalOperator.create(reactiveTransactionManager));.

This makes any query using this method are executed with a transaction even when it is just select query which doesn't needs transaction practically.

Also, it uses TransactionalOperator.create(reactiveTransactionManager) which executes TransactionDefinition.withDefaults() inside. So, transactionDefinition made by outer scope can be ignored.

Did I miss something? If so, please let me know how I use this awesome library correctly. If these operations are intended, could you explain the reason?

lpandzic commented 1 year ago

Hm, I don't recall anymore why transaction was created manually there but since tests pass without transaction operator, I'll assume it's safe to remove.

lpandzic commented 1 year ago

Released in 8.0.1