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

[Bug]: Multiple associations between same Entities fails in Persist Redis #6216

Closed
dinukaamarasinghe817 opened this issue Mar 21, 2024 · 1 comment · Fixed by ballerina-platform/module-ballerinax-persist.redis#8

Comments

@dinukaamarasinghe817
Copy link
Contributor

Description:
Creating multiple associations with different field names between the same entity fails.

Steps to reproduce:

  1. In the model.bal file add the following entities and generate the persist client code.

image

  1. Insert two entries for Person entity as follows,
    { "id": 1, "name": "Jane" },
    { "id": 2, "name": "Mike" }
  2. Then insert two entries for House entity as follows,
    { "id": "H001", "price": 10000, "personrentingId": 1, "personsellingId": 2 },
    { "id": "H002", "price": 12000, "personrentingId": 2, "personsellingId": 1 }
  3. Then query person with id = 1 with rentHouses field. You can see it gives both houses H001 and H002 as rentHouses
Copy link

This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.

      - Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
      - Reason/Regression - The issue has introduced a regression.
      - Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
      - Reason/Complex - Issue occurred due to complex scenario.
      - Reason/Invalid - Issue is invalid.
      - Reason/Other - None of the above cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
2 participants