-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relate to another entity and get it #57
Comments
Hi. There is no built in way to relate one entity to another. I'm not sure I understand what you want, but you if you want to check if another aggregate exists or has some property, you could load several aggregates in the command handler or query against a read model here. If you want to get a specific version of an aggregate there is currently no support for it. Again I think I need a bit more context to understand the problem completely. |
Assuming that I have a product entity and this product is related to an order, at a given time the product value was "100" but today this value is 50. What I would like to know is, what was the value of that order, remembering that it was 50 and today it is 100. |
I see. I think I would have solved this by saving the value in the order when it was made. It could read of a readmodel. I never do reads from other aggregates directly, but use read models to get their state. Anyway, there is no built in support to this scenario in CQRSlite. |
How to relate an entity to another entity? I have to use the AggregationId as Foreign Key or a Id Version data? When I need an specific version how I do to get it?
The text was updated successfully, but these errors were encountered: