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.
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.
- 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
- 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
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
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.
* 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.