Albert,
The code of the hash function has been updated in June.
Did you already try that one?
https://github.com/mendix/CommunityCommons/commit/b8a94b3ac6ddfae24bf334b5eb93b693fecaa685
Eric Tieniber provided a link to Github which contains corrected code. Did you try that?
Hi Albert,
I am assuming that you need hash values to quickly check if two objects are not equal.
If this is the case I would use the standard java
String - int:hashCode()
Using the Mendix runtime API you can start with the following code:
IMendixObject imo = my_entity.getMendixObject();
int hash = 0;
int mult = 1;
for ( ImendixObjectMember member : getMembers(ctx).values() ) {
hash += mult * member.parseValueToString(ctx).hashCode();
mult *= 31;
}
return hash;
You might need to correct for references, virtual attributes and system attributes but this is a good starting point.
Hope this helps,
-Andrej