Storing version references with layer entities? #485
Replies: 1 comment
-
|
Will this explicitly pin down the purchase to a specific version (last in this case)? var purchase = PurchaseCreator.New()
.product(versionContext.versions(product).last())
.create();
}
;Also, is versioning transitive - for example, if the product has a "cancellation policy" entity associated, will the purchase linked to a particular version of the product will transitively be also linked to the particular product's cancellation policy at the time of purchase? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have this use case - I want to create a purchase that is linked to a specific version of a product. Therefore, if the product changes (price changes) the purchase will always be linked to the version of the product at the time when purchase was made. Is there a way to do that automatically?
With the code below, the purchase entity will always point to the lates product entity, which is wrong -m is this assumption correct? I know that layered entities can use versioned context, but it seems the current approach is to always explicitly refer to the version, can this be automatically done?
here is some sample code:
Beta Was this translation helpful? Give feedback.
All reactions