question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fetch Read Model from Command or filter Entity snapshot

See original GitHub issue

I’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:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
carlosper88commented, Jul 9, 2021

@juanjoman I think we can close this, as the Booster.readModel feature allows us to fetch readModel from command and another readModel

1reaction
carlosper88commented, Sep 18, 2020

Thanks, 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get model snapshots API | Elasticsearch Guide [8.5] | Elastic
You can get information for multiple snapshots by using a comma-separated list or a wildcard expression. You can get all snapshots by using...
Read more >
Efficient Querying - EF Core - Microsoft Learn
Performance guide for efficient querying using Entity Framework Core. ... useful for read-only queries, but things get more complicated if ...
Read more >
Querying and filtering data | Firestore - Google Cloud
Firestore provides powerful query functionality for specifying which documents you want to retrieve from a collection or collection group.
Read more >
Retrieving Data | Firebase Realtime Database - Google
We can read data from our Firebase database by issuing a GET request to its ... If the data snapshot at the location...
Read more >
Querying data via the DbSet - Learn Entity Framework Core
Retrieving a single object ... Queries that return single entities are performed using variations of the First , FirstOrDefault , Single , SingleOrDefault...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found