Clone
Chongsun Ahn <cahn922@yahoo.com>
committed
15 months ago
OLMIS-3885 Add version to orderables
Add versionId to orderables and make a composite primary key. This increases the complexity of the mode… Show more
OLMIS-3885 Add version to orderables

Add 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.

Show less

master + 13 more