@Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    } else if (o == null || getClass() != o.getClass()) {
      return false;
    } else {
      UserEntity that = (UserEntity) o;

      EqualsBuilder equalsBuilder = new EqualsBuilder();
      equalsBuilder.append(userId, that.userId);
      equalsBuilder.append(userName, that.userName);
      equalsBuilder.append(displayName, that.displayName);
      equalsBuilder.append(localUsername, that.localUsername);
      equalsBuilder.append(consecutiveFailures, that.consecutiveFailures);
      equalsBuilder.append(active, that.active);
      equalsBuilder.append(createTime, that.createTime);
      equalsBuilder.append(version, that.version);
      return equalsBuilder.isEquals();
    }
  }
Ensure the create time is set properly when the record is created.
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UserEntity.java