Skip to content
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

My read model returns only one entity #2243

Open
IgnatovDan opened this issue Feb 22, 2022 · 0 comments
Open

My read model returns only one entity #2243

IgnatovDan opened this issue Feb 22, 2022 · 0 comments

Comments

@IgnatovDan
Copy link

IgnatovDan commented Feb 22, 2022

Describe the bug
I am working with tutorial https://reimagined.github.io/resolve/docs/tutorial/ and finished the https://reimagined.github.io/resolve/docs/tutorial/#lesson-2---read-side---create-a-read-model-to-query-shopping-lists step.

I created several entities using this command:
curl http://localhost:3000/api/commands -H "Content-Type: application/json" -X POST -d @createShoppingList.xml
+

{
  "aggregateName": "ShoppingList",
  "type": "createShoppingList",
  "aggregateId": "shopping-list-2022_-2_22_3", - here I passed several different ids
  "payload": {
    "name": "List 2022_-2_22_3"
  }
}

In console, I have seen that each connand was processed and 'createShoppingList' was finished.

However, I cannot get all entities using this command:
curl http://localhost:3000/api/query/ShoppingLists/all -H "Content-Type: application/json"

Command is finished successfully, but only the first entity is returned.

I successfully created several new entities and executed new requests to 'ShoppingLists/all' but each returns one entity again.

To Reproduce
Don't know.

Expected behavior
All entities are returned.

Screenshots
no

Desktop (please complete the following information):

  • OS: Windows
  • Browser: no
  • Node.js Version: v16.13.0.
  • ReSolve Version: "@resolve-js/[email protected]": from yarn.lock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant