Closed appreciated closed 4 months ago
When using the @Query annotation in Spring Data JDBC, like in the following code snippet:
@Query
@Query(value = "SELECT ...", resultSetExtractorClass = ...ResultSetExtractor.class) List<SomeModel> someSpecialQuery();
It appears that a new instance of the ResultSetExtractor/ RowMapper is recreated on every call to the someSpecialQuery method.
someSpecialQuery
This does not happen if the "ref" Parameter is being used.
Is this intended behaviour?
I'm using spring-boot-starter-data-jdbc:3.1.2
When using the
@Query
annotation in Spring Data JDBC, like in the following code snippet:It appears that a new instance of the ResultSetExtractor/ RowMapper is recreated on every call to the
someSpecialQuery
method.This does not happen if the "ref" Parameter is being used.
Is this intended behaviour?
I'm using spring-boot-starter-data-jdbc:3.1.2