@@ -93,9 +93,11 @@ interface DeclaredQuery {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns wether the query uses JDBC style parameters, i.e. parameters denoted by a simple ? without any index or name.
|
||||
* Returns whether the query uses JDBC style parameters, i.e. parameters denoted by a simple ? without any index or
|
||||
* name.
|
||||
*
|
||||
* @return Wether the query uses JDBC style parameters.
|
||||
* @return Whether the query uses JDBC style parameters.
|
||||
* @since 2.0.6
|
||||
*/
|
||||
boolean usesJdbcStyleParameters();
|
||||
}
|
||||
|
||||
@@ -227,12 +227,10 @@ public class SimpleJpaQueryUnitTests {
|
||||
// just verifying that it doesn't throw an exception
|
||||
createJpaQuery(SampleRepository.class.getMethod("legalUseOfJdbcStyleParameters", String.class));
|
||||
|
||||
Method illegalMethod = SampleRepository.class.getMethod("illegalUseOfJdbcStyleParameters", String.class);
|
||||
|
||||
assertThatExceptionOfType(IllegalArgumentException.class) //
|
||||
.isThrownBy( //
|
||||
() -> createJpaQuery( //
|
||||
SampleRepository.class.getMethod("illegalUseOfJdbcStyleParameters", String.class) //
|
||||
) //
|
||||
);
|
||||
.isThrownBy(() -> createJpaQuery(illegalMethod));
|
||||
}
|
||||
|
||||
private AbstractJpaQuery createJpaQuery(Method method) {
|
||||
|
||||
@@ -430,7 +430,7 @@ public class StringQueryUnitTests {
|
||||
}
|
||||
}
|
||||
|
||||
@Test // DATAJPA
|
||||
@Test // DATAJPA-1307
|
||||
public void makesUsageOfJdbcStyleParameterAvailable() {
|
||||
|
||||
SoftAssertions softly = new SoftAssertions();
|
||||
|
||||
Reference in New Issue
Block a user