Let's say i have an entity Product
which has some kind of reference to entity Invoice
. To simplify things: Let's say an Invoice
can only reference one Product
(OneToOne Association).
But i can't use a simple Association, because the Product
properties might change during usage of the application and those changes should not impact the Invoice
.
So, everytime i want to associate an Product
with an Invoice
, i should clone the Product
and have some kind of revision entity: ProductRevision
extends Product
. But Product
has some other associated entities, which have to revisioned, too.
Any ideas how to implement this nicely?