Equality is based on oid. If their OIDs match, they are considered the same entity.
bool equals(E entity) { if (_oid.equals(entity.oid)) { return true; } return false; }