Open yours-truly-phil opened 4 years ago
Entities extend AuditModel class, so renaming AuditModel to AbstractEntity
Add a @Version attribute Move the @Id to the abstract entity
create equals with equals if o1 == o2 and not equal if null or getClass() different and sth like
AbstractEntity that = (AbstractEntity) o; return version == that.version && Objects.equals(id, that.id);
also add a hashCode that hashes id and version exclusively
then think about if it makes sense to remove the lombok stuff for equals hashcode of the entities (since they can now use the abstractentity)
Entities extend AuditModel class, so renaming AuditModel to AbstractEntity
Add a @Version attribute Move the @Id to the abstract entity
create equals with equals if o1 == o2 and not equal if null or getClass() different and sth like
also add a hashCode that hashes id and version exclusively
then think about if it makes sense to remove the lombok stuff for equals hashcode of the entities (since they can now use the abstractentity)