🚀 Immutables team is happy to announce Immutables 2.8.1 release.
- 👀 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
🎉 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
updateoperations on entity in Writable interface
Mongo jackson adapter
- 👌 Support BSON
undefinedtype which is converted to java
- 👌 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
- 👉 Make BsonGenerator null safe on strings and numbers (ba78d7)
🔄 Changes related to mongo repositories (predecessor to criteria).
_idinitialization in MongoDB (#1074). PR from André Rouél
bson4gsonadapter. Support BSON
undefinedtype translated to java
bson4gsonadapter. Friendlier type conversion between BSON temporal types and java numbers (int / long etc.)
peek()method in JsonReader (6f1247)
- Require Java 8
- 👌 Support lazy hashing via
lazyhashattribute. Contrary to existing prehash, lazyhash would compute hashcode on first access to
- 🔄 Changed how
META-INF/annotations/org.immutables.value.immutableis 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 126.96.36.199 -> 188.8.131.52 (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
utilitymaven module (1089). All modules will declare dependencies explicitly.
Thanks to all contributors. In no particular order:
🛠 (not a bugfix release yet, sorry, expect more bugfixes in 2.8.x versions)
2.8.0 is available on Maven Central now
Criteria & Repositories API
Combine power of immutable objects with the flexibility of querying them
🚀 Immutables team is pleased to announce Immutables 2.8.0 release.
🚀 Major focus of this release was Criteria API which enables
👉 users to generate model-specific query DSL. Generated class (along with criteria runtime) allows accessing different backends in a unified, fluent and type-safe manner.
Benefits over raw driver API usage or string based abstractions (DSLs) are:
- Compile-time checking and type safety allows for much fewer mistakes
- IDE auto-completion guides through the choice of fields and operators
- Best in class readability due to drastically reduced number of parentheses and specially designed DNF approach ♻️ 4. Easier model refactoring
- Derive immutable implementation, query DSL, repository and more from a single definition 🔀 2. Pluggable Sync / Async / Reactive execution models
- Pluggable backend implementations 📄 4. Generated or custom Repositories (aka DAOs) can be controlled to generate reading / writing or watching operations on entities
🚀 Full release announcement here: https://github.com/immutables/immutables.github.io/blob/src/2.8.0-release.md
Getting started with criteria API: https://immutables.github.io/criteria.html
v2.7.5January 14, 2019
- 🛠 Many fixes and corrections! Thank you issue reports and PRs!
- Issues 2.7.2
- Notable stuff
- Experimental support for Codecs and Jackson (along with Gson) for mapping to MongoDB repositories (#850, #817 by @asereda-gs)
Style.optionalAcceptNullable=truenow also generates alternative constructor accepting nullable input for
java.util.Optionalattributes (#843 by @ThLeu)
org.immutables.value.Generatednow covers generated nested classes (#854 by @before)
- Thank you issue reports and PRs! Not many features here, but minor version increment was needed
- Notable stuff
org.immutables:value-annotationsannotation only jar. Previously we had equivalent artifact
annotations). Apparently some tools have trouble with properly addressing jars with classifiers and attached sources. Both artifacts are released.
org.immutables.value.Generatedannotation (which auto added to generated classes / builders) is class-retention annotation now. Some tools (like osgi related) will not automatically add such annotation as runtime dependency.
Automatic-Module-Namenow have no dashes for
org.immutables.value.annotations(annotation only) and
org.immutables.value.processor(unshaded processor). Most used artifact/module
org.immutables.valueis obviously unchanged.
- Can suppress a bit finer categories of warnings
@Suppression("immutables:subtype"), each warning message now contain such token in parentheses.
- Subtyping value type with another value type directly is now a warning, not an error. It's still better avoid it.
- Issues 2.7.1
v2.7.0August 23, 2018
v2.6.2July 20, 2018