Right, but if I was them and saw an AssertionError I would say the same. (Clearly the AssertionError was a bug, but that’s not what we’re discussing anymore.) It seems to me, if I’m understanding your code, that your repository has a method where the parameter is statically typed to AnEmbeddable. So how is it correct for Spring to call cb.parameter(Object.class) here? Surely it should create a criteria parameter with the same type as your method parameter, no? (I might be missing something.) |