Elias Volanakis schrieb:
Quick heads up:
I discovered that having beans which change their hashCode() over
their lifetime (see Person), causes problems with 3.5 databinding and
viewers.
Any objections in changing this in Person?
BankData and Customer are also affected. It's a good idea to review
your bean classes for this...
https://bugs.eclipse.org/bugs/show_bug.cgi?id=264801
Elias.
_______________________________________________
riena-dev mailing list
riena-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/riena-dev
hashCode and equals always should use properties not changing over the
lifecycle,
so I think the databinding reacts correctly: if hashCode changes its
not the same object
for databinding then before
to avoid such problems which also arrive if you're using a primary key
generated by database
all my entities have an UUID like
@Column(name = "ADR_UUID", nullable = false, updatable = false, length
= 36)
private String uUID = java.util.UUID.randomUUID().toString();
/**
* universally unique identifier (UUID), 16-byte (128-bit) (36
characters als String)
* wird als Objekt-Identität benutzt #equals() und #hashCode()
* used to guarantee object - identity #equals() and #hashCode()
*
* @return uUID as {@code String}
*/
public String getUUID() {
return this.uUID;
}
only my 2c
ekke
|