[zanata/zanata-server] 4c4964: fix(entities): ensure entity equality works on pro...

GitHub noreply at github.com
Mon Aug 17 02:58:49 UTC 2015


  Branch: refs/heads/project-roles-ui
  Home:   https://github.com/zanata/zanata-server
  Commit: 4c4964b007c51d53a55e3af34a82d6c1402fe107
      https://github.com/zanata/zanata-server/commit/4c4964b007c51d53a55e3af34a82d6c1402fe107
  Author: David Mason <drdmason at gmail.com>
  Date:   2015-08-17 (Mon, 17 Aug 2015)

  Changed paths:
    M zanata-model/src/main/java/org/zanata/model/HPerson.java
    M zanata-model/src/main/java/org/zanata/model/ModelEntityBase.java

  Log Message:
  -----------
  fix(entities): ensure entity equality works on proxies and is idempotent

Hibernate proxy entities were causing a problem because of the getClass() comparison
in ModelEntityBase.equals().
There were also many comparisons in equals and hashCode that used field comparisons,
which can give false null values in proxies. All these were changed to use method
accessors.




More information about the zanata-commits mailing list