File tree 1 file changed +11
-0
lines changed
src/test/java/org/springframework/data/jpa/repository/query
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -182,6 +182,9 @@ public void handlesMultipleNamedLikeBindingsCorrectly() {
182
182
new StringQuery ("select u from User u where u.firstname like %:firstname or foo like :bar" );
183
183
}
184
184
185
+ /**
186
+ * @see DATAJPA-292, DATAJPA-362
187
+ */
185
188
@ Test (expected = IllegalArgumentException .class )
186
189
public void rejectsDifferentBindingsForRepeatedParameter () {
187
190
new StringQuery ("select u from User u where u.firstname like %?1 and u.lastname like ?1%" );
@@ -302,6 +305,14 @@ public void detectsInBindingWithSpecialCharactersAndWordCharactersMixedInParenth
302
305
assertNamedBinding (InParameterBinding .class , "ab1babc생일233" , bindings .get (0 ));
303
306
}
304
307
308
+ /**
309
+ * @see DATAJPA-362
310
+ */
311
+ @ Test (expected = IllegalArgumentException .class )
312
+ public void rejectsDifferentBindingsForRepeatedParameter2 () {
313
+ new StringQuery ("select u from User u where u.firstname like ?1 and u.lastname like %?1" );
314
+ }
315
+
305
316
private void assertPositionalBinding (Class <? extends ParameterBinding > bindingType , Integer position ,
306
317
ParameterBinding expectedBinding ) {
307
318
You can’t perform that action at this time.
0 commit comments