Compares two Entity instances based on their identifiers.
true if both entities have equal identifiers and are of the same type.
true
the object to compare with.