Immutables v2.8.1 Release Notes

Release Date: 2019-10-19 // over 4 years ago
  • πŸš€ Immutables team is happy to announce Immutables 2.8.1 release.

    πŸ›  This release 2.8.1 comes one month after 2.8.0 and contains several improvements, bugfixes and new functionalities.

    Notable changes

    Criteria

    • πŸ‘€ Generate criteria DSL from existing JavaBeans(spec) classes. Useful for projects which use JavaBeans for legacy reasons or not yet fully migrated to immutables. See #1103
    • πŸ”Œ Pluggable ID resolution. Introduce IdResolver interface to allow users to provide their own annotations (or logic) for ID attribute selection. It complements default @Criteria.Id annotation.
    • πŸŽ‰ Initial support for partial updates. Allow partial changes to be applied directly by the backend (if supported).

      repository.update(person.id.is(123)) .set(person.name, "Changed Name") .set(person.age, 33) .execute()

    • πŸ‘Œ Support top-level count() operation similar to COUNT(*) in SQL

      repository.findAll().count(); repository.find(person.age.greaterThan(33)).count();

    • βž• Add upsert / update operations on entity in Writable interface

    Mongo jackson adapter

    • πŸ‘Œ Support BSON undefined type which is converted to java null (9a64881)
    • πŸ‘Œ Support BSON binary data (76fb7b44)
    • 🐎 Lazily read values from bson stream (1c07466). Potentially a performance improvement since values don't have to be deserialized unless required by deserializer. Allows faster skipChildren() calls.
    • πŸ‘‰ Make BsonGenerator null safe on strings and numbers (ba78d7)

    Mongo repositories

    πŸ”„ Changes related to mongo repositories (predecessor to criteria).

    • Enable _id initialization in MongoDB (#1074). PR from AndrΓ© RouΓ©l
    • πŸ‘ bson4gson adapter. Support BSON undefined type translated to java null
    • bson4gson adapter. Friendlier type conversion between BSON temporal types and java numbers (int / long etc.)
    • bson4gson adapter. Fix peek() method in JsonReader (6f1247)
    • Require Java 8

    Codegen

    • πŸ‘Œ Support lazy hashing via lazyhash attribute. Contrary to existing prehash, lazyhash would compute hashcode on first access to hashCode() method.
    • πŸ”„ Changed how META-INF/annotations/org.immutables.value.immutable is read - disabled URLConnection caching. PR-1060 from Canay Γ–ZEL
    • 0️⃣ Set optBits for Modifiable, Default maps. PR-1086 from Dylan Wragge

    ⬆️ Third party library upgrades and other dependencies

    • Jackson databind 2.8.11.3 -> 2.8.11.4 (9ea18)
    • πŸ”€ Mongo java (sync) driver 3.10.1 -> 3.11.0 (33f98d4)
    • Mongo reactive streams 1.11 -> 1.12 (fed2e07)
    • rxjava2 2.2.10 -> 2.2.12 (c6e06ce)
    • ErrorProne 2.3.2 -> 2.3.3 (b62fab4f)
    • βœ‚ Remove utility maven module (1089). All modules will declare dependencies explicitly.

    Thanks to all contributors. In no particular order: