Closed aryu-ki closed 1 year ago
You're right. This is because CriteriaDelete
is not a CriteriaQuery
. See also #2936
@mp911de You should change documentation string of toPredicate if I'm right, because it's a confusing doc. I could find the issue fast, but in my code, there were no obvious signs of what was going on. Other developers might get confused as well. Who knows how much time is it gonna cost to someone. It's obvious that documentation is misleading! At least change it to 'should' instead of 'must' or provide some additional docs on exceptional cases
I also think that toPredicate's method documentation should be changed, It does cause confusion
This is the definition of delete method in SimpleJpaRepository. Clearly, query param sent is null, but in Specification::toPredicate we have this doc: