Commit Graph

493 Commits

Author SHA1 Message Date
Gavin King e0111d3655 remove unnecessary code, fixing bug in generated imports
for Jakarta Data TCK work

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-09 10:05:02 +02:00
Gavin King 03246e34a4 tolerate Set + Collection for multivalued @Query parameters
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-09 10:04:52 +02:00
Gavin King 08d5da7844 simplification, use getAllMembers() in processor
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-02 16:38:36 +02:00
Gavin King a12a2cad80 support for queries defined in intermediate classes
for our work on the Jakarta Data TCK

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-02 16:38:30 +02:00
Gavin King 7d80b8a3db fix to @OrderBy for @Query methods with primary entity type
don't think this is even strictly-speaking required by Jakarta Data
but we will allow it

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-02 16:38:22 +02:00
Gavin King dcfc254635 fix another bug in detecting when a repo method param is multivalued
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-02 16:38:18 +02:00
Gavin King d99309db52 fix a bug in detecting when a repo method param is multivalued
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-02 16:38:14 +02:00
Gavin King 8db57d791b when CDI is missing, do still add an @Inject annotation on the constructor
at least when jakarta.inject is available

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-02 16:38:11 +02:00
Gavin King 01ee8eacd8 when CDI is missing, don't create default constructor for injection
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-02 16:38:08 +02:00
Gavin King b2e572fc30 add a couple of extra tests for Jakarta Data
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-02 16:38:04 +02:00
Gavin King 427de60322 fix for Bean Validation annotations on @Query method parameters
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-02 16:38:01 +02:00
Gavin King af3b9f011b simplify the generated code for cursored pagination
as suggested by Nathan Rauh

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-02 16:37:56 +02:00
Gavin King 985ea18a5a fix cursored previous page navigation
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-02 16:37:53 +02:00
Gavin King 0745ed0770 fix bug where type annotations got generated onto Class literals
needed for Jakarta Data TCK

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-02 16:37:49 +02:00
Gavin King af153b00fb fix bug in handling of 'this', fix error locations for HQL validation
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-02 16:37:45 +02:00
Gavin King 0f5827a7d1 allow binding Lists to 'in' condition parameters for @Query method
required by Jakarta Data, and generally very useful!

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-02 16:37:39 +02:00
Gavin King 17ab28a220 allow long as return type of mutation @Query method
required by Jakarta Data

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-02 16:37:31 +02:00
Gavin King 31b5af94c1 HHH-17882 test for list of warnings in addSuppressWarningsAnnotation
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-02 16:37:27 +02:00
Gavin King 16ebcc427b HHH-17882 accept a list of warnings to suppress in addSuppressWarningsAnnotation
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-02 16:37:21 +02:00
Gavin King 26beb3db64 tolerate badly-typed PageRequest parameters
as required by Jakarta Data TCK

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-02 16:37:13 +02:00
Gavin King 1551afc4ef minor cleanup to annotation handling in processor
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-02 16:37:08 +02:00
Gavin King 108374d4f0 let a handwritten metamodel "override" the generated one
used in the JD TCK (ffff)

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-02 16:37:03 +02:00
Gavin King e829a01aee fix a bug in @Query handling
add a test for empty query string in @Query

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-02 16:36:51 +02:00
Gavin King 6de223572e handle unqualified enum values in @Query
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-02 16:36:23 +02:00
Gavin King 8caa7096fb make fully-qualified enum literals in @Query pass the validation
JD examples and TCK require this, though it's not really correct

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-02 16:36:18 +02:00
Gavin King c32f0a08fa hack in acceptance of PageRequest<?>
JD examples and TCK require this, though it's not really correct

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-03-28 10:03:28 +01:00
Gavin King 091ba9af76 fix bug in checking of PageRequest type arg
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-03-28 10:03:28 +01:00
Gavin King 39fb5a6549 support 'this' with @Query repository methods
in a very temporary way

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-03-28 10:03:28 +01:00
Gavin King 49d440e653 fix handling of @By("id(this)")
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-03-28 10:03:27 +01:00
Gavin King b2ec831e81 spec-compliant inference of entity type in @Query
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-03-28 10:03:27 +01:00
Stéphane Épardaud b16729b8a7 Update javax.transaction to jakarta.transaction 2024-03-27 16:27:38 +01:00
Gavin King 3fcf0e0f0c HHH-17895 add comment
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-03-27 11:39:53 +01:00
Gavin King 09e7b6dd16 HHH-17895 workaround for bug in Java 21
also be more careful about type annotations in comparing types

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-03-27 11:39:53 +01:00
Gavin King 6b9d6ef4fb HHH-17895 tests for Bean Validation annotations in Jakarta Data
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-03-27 11:39:53 +01:00
Gavin King 72fab5af89 HHH-17891 support method-level interceptors for JD repositories
as required by the spec

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-03-27 11:39:53 +01:00
Gavin King 40440a6089 HHH-17891 support toplevel interceptors for JD repositories
as required by the spec

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-03-27 11:39:53 +01:00
Gavin King 9b3c86f571 eliminate duplicate error messages
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-03-27 11:39:53 +01:00
Gavin King 8d238536ae test and fix for bug in repo method parameter checking
this lead to a TCK failure

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-03-27 11:39:53 +01:00
Gavin King 80792f5b8d more information about errors relating to inherited members in processor
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-03-27 11:39:53 +01:00
Gavin King 8148c32cd7 experimental support for reactive Jakarta Data repositories
some cleanup

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-03-27 11:39:53 +01:00
Gavin King fb4d91db8e experimental support for reactive Jakarta Data repositories
this time with uni-fied access to the M.SS

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-03-27 11:39:53 +01:00
Gavin King c9777dcd57 experimental support for reactive Jakarta Data repositories 2024-03-27 11:39:52 +01:00
Gavin King 1c6d272919 support for 'id(this)'
just changed this in JD
2024-03-27 11:39:52 +01:00
Gavin King a12d589e77 use getAllMembers() when resolving Jakarta Data paths 2024-03-25 18:06:00 +01:00
Gavin King 4dc437b9aa use createMutationQuery() and createSelectionQuery()
squashes a deprecation warning in Maven
2024-03-25 18:05:24 +01:00
Gavin King d1734a3964 add missing processor dependencies that are needed in Maven
Gradle didn't need these
2024-03-25 18:05:20 +01:00
Gavin King 2d9f633188 move Quarkus Repositories to normal scope 2024-03-25 18:05:14 +01:00
Gavin King 0ef576a19b simplification to JD generated code
because I got a requirement removed from spec
2024-03-25 18:05:09 +01:00
Gavin King 361c146928 HHH-17864 generate static metamodel fields for embeddables 2024-03-25 18:05:03 +01:00
Gavin King 69c5163d1b we changed Iterable -> List in Data spec 2024-03-25 18:04:43 +01:00