Skip to content

Release of version 1.1.0

Choose a tag to compare

@erioh erioh released this 28 Oct 16:39
· 15 commits to master since this release
f557c99

New in generated wrappers

  • Typed query builder: FancyTableWrapper.query().firstName().eq("x").and(q -> q.amount().gt(TEN).or().activated().isNull()).fetch(), with eq, ne, gt, ge, lt, le, between, in, notIn, isNull, isNotNull, like/notLike, groups, asc()/desc(), limit/offset, and fetch() / fetchModels() / fetchCount(). Works with and without ActiveJDBC instrumentation (#36)
  • A constant per column, e.g. FancyTableWrapper.FIRST_NAME, for raw SQL (#25)
  • static wrap(Collection) to turn query results into wrappers (#26)
  • Enum columns, stored by name (#43)
  • byte[], java.util.Date, Instant and BigInteger columns (#15)
  • Static nested model classes (Outer.Inner → Outer_InnerWrapper) (#24) and models in the default package (#17)
  • activejdbc.wrapper.builder.method.prefix option for builder method names (withFirstName(...))
  • @Generated on wrappers (#16), indented code (#29), members in annotation order (#14), readable arrays in toString (#28)
  • Gradle incremental compilation: the processor is declared isolating (#27)

Fixes

  • Boolean getters return null for NULL columns instead of false (#41)
  • equals/hashCode compare BigDecimal by value, so 1.5 equals 1.50 (#42)
  • java.sql.Date, Time, LocalDate and LocalTime properties work on TIMESTAMP columns (Oracle) (#44)
  • Clob columns no longer generate a call to a missing getClob() (#40)
  • Problems in annotated classes are reported as compiler errors instead of crashing the processor or generating code that doesn't compile: unwrappable classes, invalid or duplicate property names, primitive types (#10, #13, #23)
  • toString fix

Worth knowing when upgrading

  • Boolean getters can now return null, and wrappers with BigDecimal values that differ only in scale are now equal.
  • On JDK 23+ javac no longer runs processors found only on the classpath: enable it explicitly (see the README).
  • The library is a runtime dependency, as before (wrappers extend ActivejdbcWrapper); the query builder and the date/time getters use classes from it.
  • README has a new "Known limitations" section, mostly about Oracle (#45).

Requires Java 8+ and ActiveJDBC 2.2. Tested on JDK 8, 11, 17, 21, 25 and 27, H2, Oracle 23ai and Oracle XE 21c.