OLMIS-3885 Add version to orderables Add versionId to orderables and make a composite primary key. This increases the complexity of the mode…
OLMIS-3885 Add version to orderablesAdd versionId to orderables and make a composite primary key. This increases the complexity of the model. In particular:* It requires all foreign key tables to have a composite foreign key with a versionId field.* This composite key needs to play well with Hibernate, which was done by defining OrderableIdentity and annotating it with EmbeddedId.* Orderable no longer extends BaseEntity because a new OrderableIdentity has the id, not BaseEntity.* A new Orderable constructor is defined to allow setting id and versionId when constructing. This seems to make more sense because an orderable should have an id (and versionId).Also the orderable DTO needs to deal with the new meta properties. It has a unique way of determining equality because it needs to see that lastUpdated match by the actual timestamp.Query methods were added and changed to query by latest orderable.