Fetch Read Model from Command or filter Entity snapshot
See original GitHub issueI’ve been trying to create a side project with Booster, but there’s a point where I get stuck. In one of the commands I need to fetch some data from the database. For fetching this data, some filtering is needed, so the fetchEntitySnapshot
doesn’t work for me as it requires an id to be passed as an argument.
My second thought was to try to read a readModel from inside the command, but I’m not sure this is possible with current Booster implementation. Is there any way to achieve this?
The last workaround would be to somehow create a readModel with the data already filtered and let the client read it and then pass it through the command where the filter is needed, but this would involve some extra work and complexity on the client-side.
As you can see, fetchEntitySnapshot
with some filtering or commands being able to read readModels, would be the best approaches here. Is it possible or is it planned to be possible to do this with Booster anywhere soon?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
@juanjoman I think we can close this, as the
Booster.readModel
feature allows us to fetch readModel from command and another readModelThanks, Javi, I’ll take a look. For my functionality, I think I’ll have pretty static data, so it shouldn’t be a problem if they’re not 100% up to date, as they won’t be changing over time.