@Override public int hashCode(){
  final int prime=31;
  int result=super.hashCode();
  result=prime * result + (tenant == null ? 0 : tenant.hashCode());
  return result;
}

@ Override public int hashCode ( ) { final int prime = 31 ; int result = super . hashCode ( ) ; result = prime * result + ( tenant == null ? 0 : tenant . hashCode ( ) ) ; return result ; }
tenant aware entities extend the equals / hashcode strategy with the tenant name . that would allow for instance in a multi - schema based data separation setup to have the same primary key for different entities of different tenants .
