BaseDataObject equality

"Robert A. Decker" <[email protected]> Fri, 15 May 2026 14:51:21 +0200
Newsgroups gmane.comp.java.cayenne.user
Message-ID <[email protected]>
How should I be checking equality between persistent objects, to use a =
java.util.HashSet for example?

Is the ObjectId of a BaseDataObject the same across all ObjectContexts =
for a database row?

Do people using cayenne override the equals method:
  return this.getObjectId().equals(other.getObjectId());

Or is there a different way people usually check equality? (compare =
primary keys, etc?)

Rob=