Move query-by-name methods out to "dedicated" repositories/tests#1484
Conversation
njr-11
left a comment
There was a problem hiding this comment.
Although some of the TCK classes could benefit from refactoring, I don't agree with this approach that tries to create a separation between the Query by Method Name test cases and all the others. Given that Query by Method Name was the predominant pattern in Data 1.0 (@Find didn't have Constraints yet), most of the tests of useful Data 1.0 function happened to use the Query by Method Name pattern. So a refactoring based on what is using Query by Method Name versus what is not is arbitrary and a very poor way to split up the TCK -- one that risks losing a lot of coverage for core scenarios completely unrelated to Query by Method Name if Query by Method Name is ever deprecated and dropped from the spec. Also, any refactoring that is done ought to be more meaningful and done in smaller, more reviewable chunks.
|
@njr-11 I asked Marko to do this for three reasons:
I don't agree with this. Nobody using Jakarta Data with plain Hibernate or on Quarkus even has QBMN as an option. We supply it in WildFly for EE spec compliance.
Query by Method Name is already explicitly deprecated. |
P.S. I you're concerned that any test assertions or test coverage might be lost, I can get GPT-5.5 to do a careful review across the two branches and look for any discrepancies. I have complete confidence it will find any that exist. This is not the sort of thing humans should be wasting time on. |
That is taken out of context. What I mean by this is that if a Data 1.0 test case intended to cover some core functionality like pagination, and it wants to perform a basic query such as less than, the simplest way to do that in Data 1.0 is to use Query by Method Name. We didn't have the As we are all aware, Query by Method Name was not moved to its own separate module until the very end of Data 1.0, well after the 1.0 TCK had already been written. At the time the only alternative would have been to use
Hopefully most of the tests that have already been added in Data 1.1 will be more acceptable because. They have been aiming to follow better practices. |
So that it is possible to run the tests without needing to generate the query-by-method-name repository methods.