You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say that you use FetchForWriting() in a command, then immediately want the latest state for whatever the "T" aggregate was as the response in a command. We could use a read only version of FetchForWriting() that tries the most effeciently way possible to get you the current status of the "T" after SaveChangesAsync() is called.
Some notes:
API could be IDocumentSession.Events.FetchLatestAsync<T>()
If the projection is Inline, try to pluck it from the identity map. You'd have this if the identity map is enabled for the session, or you use the optimization for opting into the identity map for aggregations
In the case of live aggregations, have FetchForWriting() add the fetched version to the identity map. FetchForLatestAsync() could use that as a starting point, then apply the events from the StreamAction in history of the session to build the latest
In the case of async, try to have FetchForWriting() stash the starting point of the aggregate in the identity map. Maybe, try to first use the events appended on top of the initial version fetched?? Otherwise, fetch from db normally
The text was updated successfully, but these errors were encountered:
As a companion to JasperFx/wolverine#1161.
Let's say that you use
FetchForWriting()
in a command, then immediately want the latest state for whatever the "T" aggregate was as the response in a command. We could use a read only version ofFetchForWriting()
that tries the most effeciently way possible to get you the current status of the "T" afterSaveChangesAsync()
is called.Some notes:
IDocumentSession.Events.FetchLatestAsync<T>()
Inline
, try to pluck it from the identity map. You'd have this if the identity map is enabled for the session, or you use the optimization for opting into the identity map for aggregationsFetchForLatestAsync()
could use that as a starting point, then apply the events from the StreamAction in history of the session to build the latestThe text was updated successfully, but these errors were encountered: