sageserpent-open / plutonium

CQRS providing bitemporal object modelling for Java POJOs and Scala too.
MIT License
5 stars 0 forks source link

Allow change / observation lambdas to execute queries. #70

Open sageserpent-open opened 3 years ago

sageserpent-open commented 3 years ago

Currently, a change or an observation lambda block must only mutate the identified objects it is passed - so it can't query these objects in their initial state and conditionally mutate them.

The idea here is to treat the entire lambda object as being a patch in its own right - so just as a current patch may refer to a receive identifiable and argument ones, we could simply have no target identifiables and just argument ones. The existing dependency tracking already copes with the notion of a mutation causing queries and mutations on the argument objects, so this may be a simple change, allowing a larger class of events to be modelled.