After reading the book; I understood the following:
1) Entities should implement equality and compare by ID. 2) Value Objects should implement equality and compare by all properties in the class.
I still believe that my understanding of point two is correct. However, I am confused about point one because of the following:
1) This blogger talks about creating an entity base class, which all entities inherit from: http://enterprisecraftsmanship.com/2014/11/08/domain-object-base-class/. Therefore all entities implement equality by ID because the equality comparisons are defined in the base class.
2) Most of the entity classes here have IDs: https://github.com/nhibernate/nhibernate-core/tree/master/src/NHibernate.DomainModel/Northwind/Entities
3) This question seems to suggest having an ID attribute: ID properties on Domain objects in DDD
4) This question points to a YouTube video (point one) where it is argued that entities should not have IDs.
Points 1-4 above seem to suggest either: 1) use a database ID; 2) use another ID that is not the database ID; 3) Use no ID.
I am trying to decide whether:
1) Have an entity superclass.
or 2) Have an ID (from database) in every entity.
or 3) Introduce an identifier (not database id) that identifies domain objects.
I am trying to completely isolate the domain model (I also have a data model).