File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
src/test/java/org/springframework/data/jpa/repository/query Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -182,6 +182,9 @@ public void handlesMultipleNamedLikeBindingsCorrectly() {
182182 new StringQuery ("select u from User u where u.firstname like %:firstname or foo like :bar" );
183183 }
184184
185+ /**
186+ * @see DATAJPA-292, DATAJPA-362
187+ */
185188 @ Test (expected = IllegalArgumentException .class )
186189 public void rejectsDifferentBindingsForRepeatedParameter () {
187190 new StringQuery ("select u from User u where u.firstname like %?1 and u.lastname like ?1%" );
@@ -302,6 +305,14 @@ public void detectsInBindingWithSpecialCharactersAndWordCharactersMixedInParenth
302305 assertNamedBinding (InParameterBinding .class , "ab1babc생일233" , bindings .get (0 ));
303306 }
304307
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+
305316 private void assertPositionalBinding (Class <? extends ParameterBinding > bindingType , Integer position ,
306317 ParameterBinding expectedBinding ) {
307318
You can’t perform that action at this time.
0 commit comments