Commit Graph
34 Commits
Author SHA1 Message Date
Rob Bygrave b3a577e3f9 #3234 - Query Bean Generator Generates Non-Compilable Code When Entity Uses @Embeddable Inner Class For Primary Key Type 2023-10-09 22:03:02 +13:00
Rob Bygrave 395edb62bf In version 13.22 if the entity definition is in a different package, the generated query bean cannot resolve the symbol erro 2023-10-09 21:10:56 +13:00
Rob Bygrave ff43672f4e Move source to Jakarta (use ./jakarta-to-javax.sh)
Moving the master branch to use jakarta based code and
dependencies. Change to use ./jakarta-to-javax.sh to convert
back to javax when releasing that.
2023-09-11 23:31:01 +12:00
Rob Bygrave f03892a4bd #3216 - Fix querybean generation for @Embedded beans (fix for 13.22.0 change)
Version 13.22.0 added a change to query bean generation that has an issue for
embedded beans. This fixes that issue.
2023-09-11 23:01:44 +12:00
Roland Praml dede93ca62 Use char-append instead of String-append 2023-08-21 08:22:18 +02:00
Rob Bygrave ded4b94e54 Add Query bean filterMany() taking a closure
Query beans also generate a "Assoc" query bean that is used
for the relationships. Previously these were generated into a
.query.assoc package and with this they are generated as an
inner class of the query bean.

This then allows the change where an additional filterMany()
is generated on the "Assoc" bean that takes a closure. This
simplifies the use of query beans for filterMany.

This change to the generated query beans needs a change to the
ebean-agent enhancement.
2023-08-18 22:12:30 +12:00
Rob Bygrave e4c4b0b43d [QueryBeans] Generate the query beans as final classes 2023-02-28 23:15:42 +13:00
Rob Bygrave 0bb2f104a4 [QueryBeans] Fix for missing inherited properties when parent only has @DiscriminatorValue
A parent in the Inheritance hierarchy has @DiscriminatorValue but not the @Inheritance annotation. The bug means the inherited properties are not included on the generated query bean.

The fix is to the querybean-generator to pick up inherited properties for this case.
2023-02-28 23:02:19 +13:00
Rob Bygrave 4ec46e3008 [QueryBeans] Refactor splitting TQAssocBean into TQAssoc & TQAssocBean
- Requires ebean-agent to be up-to-date (13.13.2 or greater)
- Split TQAssocBean into 2, one for embeddable beans and the other for the reset
- The eq(), in() etc expressions go to TQAssoc
- Add fetch() methods to TQAssocBean
- No longer generate the fetch() methods as we now have them on TQAssocBean
2023-02-27 17:46:11 +13:00
Rob Bygrave c381464316 querybean-generation - cast for varargs use and use wildcard collections 2023-02-27 15:24:59 +13:00
Rob Bygrave a5d5549f2c [querybeans] Add support for using interface types with querybean expressions eq() in() etc WHEN entity beans implement an interface
- For the case where entity beans implement an interface
- Adds these expressions to the "associated" querybeans (not the root querybeans).
- The expressions added use of the interface type
2023-02-27 13:12:52 +13:00
rob 5882169641 Merge branch 'feature/StdExpressions' 2023-02-14 11:35:31 +13:00
Rob Bygrave 0e9b83a1ce #2914 - Refactor ProcessingContext.getPropertyType() internals and whitespace 2022-12-08 11:37:10 +13:00
Rob Bygrave d2f629e7bb #2914 - Query bean generation support for @ElementCollection with validaiton annotations - NPE NullPointerException 2022-12-08 11:10:23 +13:00
Rob Bygrave 97bbce321d Make Query.Property parameterised with <BT> "Base Type" as Number, String, Temporal, Boolean or Object
These types then determine which functions are valid for the types. So:
- Number functions
- String/varchar functions
- Temporal Date, DateTime, Time functions
- Boolean functions
- Object being everything else
2022-11-08 21:57:36 +13:00
Rob Bygrave 1d9db88050 #2733 - Rename ModuleInfoLoader to EntityClassRegister and _Ebean$ModuleInfo to EbeanEntityRegister 2022-07-11 15:35:46 +12:00
Rob Bygrave 1ee18a1823 #2711 - Gradle: Change querybean generator from isolating to aggregating 2022-06-09 12:26:36 +12:00
Rob Bygrave 9dea51b7a0 #2692 - [querybean generation] Compile error, incorrect generation with nested inner class/record @Embeddable and @IdClass 2022-05-16 18:48:42 +12:00
Rob Bygrave 24d8f38b1d #2374 - Bump to Java 11 and module-path 2022-03-31 08:42:14 +13:00
Rob Bygrave 033c579984 #2398 - Fix compiler warning for annotation processing query bean generators 2021-09-24 17:51:36 +12:00
Rob BygraveandGitHub 0bf8c9eb64 Add module-info support via multi-version jar (#2381) 2021-09-21 14:37:51 +12:00
rbygrave 50bb7086ac Junit5 bump - tidy ebean-test 2021-09-06 21:01:50 +12:00
rbygrave af8cf9c6c7 Junit5 bump - querybean-generator 2021-09-06 20:57:48 +12:00
Ryszard Trojnacki 847ce5db88 Added PByteArray query bean type for byte[] column type. 2021-08-31 11:34:35 +02:00
rbygrave 1642833fdb Improve javadoc on TQRootBean and generated javadoc on query bean forFetchGroup() method 2021-07-22 18:56:02 +12:00
rbygrave 678743cc10 Use upper case E for class name of generated _Ebean$ModuleInfo 2021-06-09 21:59:19 +12:00
Robin Bygrave 9d54b264ad #2219 - Compile error with ZonedDateTime and query beans - type argument java.time.ZonedDateTime is not within bounds of type-variable D 2021-04-19 17:04:57 +12:00
Rob BygraveandGitHub d75d1fce43 Change ModuleInfoLoader API and querybean-generator for named default database (#2190)
Currently we can not use @DbName with the entities of the default database. With this change the generated code that registers entity classes will support using @DbName with the default database.
2021-03-11 20:42:25 +13:00
Robin Bygrave 2672dff512 #2155 - QueryBeans: Change to use own @Generated with retention RUNTIME 2021-02-10 15:28:55 +13:00
Robin Bygrave 53aacabce7 #2154 - QueryBeans: TargetEntity is not evaluated during bean generation resulting in bad query beans 2021-02-10 15:10:03 +13:00
Robin Bygrave ab9cdd8f5b #2153 - QueryBeans: OneToMany Map property is handled as PScalar instead of TQAssocBean 2021-02-10 13:52:29 +13:00
SnōwballandGitHub a132f09b03 Ignore javax.persistence.Transient in query beans (#2129)
* Add failing tests for transient types

* Ignore jpa @Transient fields in query beans

Any field marked with jpa @Transient should be ignored
2020-12-15 12:40:06 +13:00
SnōwballandGitHub bcc8040afe Scalar type querybeans generics error (#2082)
* Add failing test case for generic querybeans

Types with generics arguments have not been processed correctly, they
will lose their generics. This is not critical in Java, as the language
has to be backwards compatible with Java 1.4, but will still become
highlighted as a warning in all common IDEs.

In Kotlin however, it's not a warning but a compile error.

* Fix problem with generics in scalar type arg

This fixes the issue introduced with ScalarType aware querybeans.
2020-10-16 09:57:32 +13:00
rob bygrave 038db79737 #2069 - Add ebean-querybean, querybean-generator and kotlin-querybean-generator as modules 2020-10-09 00:02:09 +13:00