-
Notifications
You must be signed in to change notification settings - Fork 23
/
2.8.1-release.html
162 lines (142 loc) · 11 KB
/
2.8.1-release.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"-->
<link rel="stylesheet" href="/gfx/bootstrap.min.css">
<link rel="stylesheet" href="/gfx/main.css">
<link rel="stylesheet" href="/gfx/code.css">
<title>2.8.1 Release Notes</title>
</head>
<body class="page">
<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-PMJSKV"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-PMJSKV');</script>
<!-- End Google Tag Manager -->
<header>
<div class="container">
<a href="/">Immutables</a> ←
<h1>2.8.1 Release Notes <iframe src="https://ghbtns.com/github-btn.html?user=immutables&repo=immutables&type=star&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe>
</h1>
</div>
</header>
<aside id="toc"></aside>
<section class="documentation">
<h2 id="overview">Overview</h2>
<p><a href="https://immutables.github.io/">Immutables</a> team is happy to announce Immutables 2.8.1 release.</p>
<p>This release comes one month after <a href="https://github.com/immutables/immutables.github.io/blob/src/2.8.0-release.md">2.8.0</a> and contains
several improvements, bugfixes and new functionalities.</p>
<h1 id="notable-changes">Notable changes</h1>
<h3 id="criteria">Criteria</h3>
<ul>
<li>Generate criteria DSL from existing <a href="https://en.wikipedia.org/wiki/JavaBeans">JavaBeans</a>(<a href="https://www.oracle.com/technetwork/articles/javaee/spec-136004.html">spec</a>) classes. Useful for projects which use JavaBeans for legacy reasons or not yet fully migrated to immutables. See <a href="https://github.com/immutables/immutables/pull/1103">#1103</a></li>
<li>Pluggable ID resolution. Introduce <a href="https://github.com/immutables/immutables/blob/master/criteria/common/src/org/immutables/criteria/backend/IdResolver.java">IdResolver</a> interface to allow users to provide their own annotations (or logic) for ID attribute selection. It complements
default <code class="language-plaintext highlighter-rouge">@Criteria.Id</code> annotation.</li>
<li>Initial support for partial updates. Allow partial changes to be applied directly by the backend (if supported).
<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">// example</span>
<span class="n">repository</span><span class="o">.</span><span class="na">update</span><span class="o">(</span><span class="n">person</span><span class="o">.</span><span class="na">id</span><span class="o">.</span><span class="na">is</span><span class="o">(</span><span class="mi">123</span><span class="o">))</span>
<span class="o">.</span><span class="na">set</span><span class="o">(</span><span class="n">person</span><span class="o">.</span><span class="na">name</span><span class="o">,</span> <span class="s">"Changed Name"</span><span class="o">)</span>
<span class="o">.</span><span class="na">set</span><span class="o">(</span><span class="n">person</span><span class="o">.</span><span class="na">age</span><span class="o">,</span> <span class="mi">33</span><span class="o">)</span>
<span class="o">.</span><span class="na">execute</span><span class="o">()</span>
</code></pre></div> </div>
</li>
<li>Support top-level <code class="language-plaintext highlighter-rouge">count()</code> operation similar to <code class="language-plaintext highlighter-rouge">COUNT(*)</code> in SQL
<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">repository</span><span class="o">.</span><span class="na">findAll</span><span class="o">().</span><span class="na">count</span><span class="o">();</span>
<span class="n">repository</span><span class="o">.</span><span class="na">find</span><span class="o">(</span><span class="n">person</span><span class="o">.</span><span class="na">age</span><span class="o">.</span><span class="na">greaterThan</span><span class="o">(</span><span class="mi">33</span><span class="o">)).</span><span class="na">count</span><span class="o">();</span>
</code></pre></div> </div>
</li>
<li>Add <code class="language-plaintext highlighter-rouge">upsert</code> / <code class="language-plaintext highlighter-rouge">update</code> operations on entity in Writable interface</li>
</ul>
<h3 id="mongo-jackson-adapter">Mongo jackson adapter</h3>
<ul>
<li>Support BSON <code class="language-plaintext highlighter-rouge">undefined</code> type which is converted to java <code class="language-plaintext highlighter-rouge">null</code> (<a href="https://github.com/immutables/immutables/commit/9a64881">9a64881</a>)</li>
<li>Support BSON binary data (<a href="https://github.com/immutables/immutables/commit/76fb7b44">76fb7b44</a>)</li>
<li>Lazily read values from bson stream (<a href="https://github.com/immutables/immutables/commit/1c07466">1c07466</a>). Potentially a performance improvement since values don’t have to be deserialized unless required by deserializer. Allows faster <code class="language-plaintext highlighter-rouge">skipChildren()</code> calls.</li>
<li>Make BsonGenerator null safe on strings and numbers (<a href="https://github.com/immutables/immutables/commit/ba78d7">ba78d7</a>)</li>
</ul>
<h3 id="mongo-repositories">Mongo repositories</h3>
<p>Changes related to <a href="https://immutables.github.io/mongo.html">mongo repositories</a> (predecessor to criteria).</p>
<ul>
<li>Enable <code class="language-plaintext highlighter-rouge">_id</code> initialization in MongoDB (<a href="https://github.com/immutables/immutables/pull/1074">#1074</a>). PR from <a href="https://github.com/arouel">André Rouél</a></li>
<li><code class="language-plaintext highlighter-rouge">bson4gson</code> adapter. Support BSON <code class="language-plaintext highlighter-rouge">undefined</code> type translated to java <code class="language-plaintext highlighter-rouge">null</code></li>
<li><code class="language-plaintext highlighter-rouge">bson4gson</code> adapter. Friendlier type conversion between BSON temporal types and java numbers (int / long etc.)</li>
<li><code class="language-plaintext highlighter-rouge">bson4gson</code> adapter. Fix <code class="language-plaintext highlighter-rouge">peek()</code> method in JsonReader (<a href="https://github.com/immutables/immutables/commit/6f1247">6f1247</a>)</li>
<li>Require Java 8</li>
</ul>
<h3 id="codegen">Codegen</h3>
<ul>
<li>Support <a href="https://immutables.github.io/immutable.html#lazy-computation-of-hashcode">lazy hashing</a> via <code class="language-plaintext highlighter-rouge">lazyhash</code> attribute. Contrary to existing <a href="https://immutables.github.io/immutable.html#lazy-computation-of-hashcode">prehash</a>, lazyhash would compute hashcode on first access to <code class="language-plaintext highlighter-rouge">hashCode()</code> method.</li>
<li>Changed how <code class="language-plaintext highlighter-rouge">META-INF/annotations/org.immutables.value.immutable</code> is read - disabled URLConnection caching. <a href="https://github.com/immutables/immutables/issues/1060">PR-1060</a> from <a href="https://github.com/canayozel">Canay ÖZEL</a></li>
<li>Set optBits for Modifiable, Default maps. <a href="https://github.com/immutables/immutables/pull/1086">PR-1086</a> from <a href="https://github.com/dwragge">Dylan Wragge</a></li>
</ul>
<h3 id="third-party-library-upgrades-and-other-dependencies">Third party library upgrades and other dependencies</h3>
<ul>
<li>Jackson databind 2.8.11.3 -> 2.8.11.4 (<a href="https://github.com/immutables/immutables/commit/9ea18">9ea18</a>)</li>
<li>Mongo java (sync) driver 3.10.1 -> 3.11.0 (<a href="https://github.com/immutables/immutables/commit/33f98d4">33f98d4</a>)</li>
<li>Mongo reactive streams 1.11 -> 1.12 (<a href="https://github.com/immutables/immutables/commit/fed2e07">fed2e07</a>)</li>
<li>rxjava2 2.2.10 -> 2.2.12 (<a href="https://github.com/immutables/immutables/commit/c6e06ce">c6e06ce</a>)</li>
<li>ErrorProne 2.3.2 -> 2.3.3 (<a href="https://github.com/immutables/immutables/commit/b62fab4f">b62fab4f</a>)</li>
<li>Remove <code class="language-plaintext highlighter-rouge">utility</code> maven module (<a href="https://github.com/immutables/immutables/issues/1089">1089</a>). All modules will
declare dependencies explicitly.</li>
</ul>
<p>Thanks to all contributors. In no particular order:</p>
<ul>
<li><a href="https://github.com/dwragge">Dylan Wragge</a></li>
<li><a href="https://github.com/canayozel">Canay ÖZEL</a></li>
<li><a href="https://github.com/arouel">André Rouél</a></li>
</ul>
</section>
<footer class="jumbotron">
<div class="container">
<h2 id="guides">Guides</h2>
<ul>
<li><a href="/getstarted.html">Get started!</a></li>
<li><a href="/intro.html">Inception</a></li>
<li><a href="/immutable.html">Immutable objects</a></li>
<li><a href="/factory.html">Factory builders</a></li>
<li><a href="/functional.html">Functions and Predicates (for Java 7)</a></li>
<li><a href="/style.html">Style customization</a></li>
<li><a href="/json.html">JSON serialization</a></li>
<li><a href="/criteria.html">Criteria</a></li>
<li><a href="/mongo.html">MongoDB repositories</a></li>
<li><a href="/dynamodb.html">DynamoDB integration</a></li>
<li><a href="/encoding.html">Encoding: Customizing attributes and builders (experimental)</a></li>
<li><a href="/apt.html">Using annotation processor in IDE</a></li>
</ul>
<h2 id="get-involved">Get involved</h2>
<ul>
<li>Clone source repository, contribute bug reports and fixes on <a href="https://github.com/immutables/immutables">GitHub immutables/immutables</a></li>
<li>Issue reports, questions and feedback is welcome on issue tracker <a href="https://github.com/immutables/immutables/issues">GitHub immutables/immutables/issues</a></li>
<li>News and announcements on twitter <a href="https://twitter.com/ImmutablesOrg">@ImmutablesOrg</a></li>
</ul>
<p><a href="/license.html">Apache License 2.0</a></p>
<!--<div><h2>Posts</h2>
<ul>
</ul>
</div>-->
</div>
</footer>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script defer src="/gfx/jquery.toc.min.js"></script>
<script>
$(function() {
$('#toc').toc({
container: '.documentation',
selectors: 'h1,h2,h3,h4',
anchorName: function(i, heading, prefix) {
heading = $(heading).text();
if (heading.trim) heading = heading.trim();
return heading.toLowerCase().replace(/ /g, '-').replace(/[^a-z^\-]+/g, '');
},
})
})
</script>
</body>
</html>