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: Syncing issue when using XStore Association Mapping #524

Closed
kshradhan opened this issue Sep 27, 2021 · 1 comment · Fixed by #641
Closed

Bug: Syncing issue when using XStore Association Mapping #524

kshradhan opened this issue Sep 27, 2021 · 1 comment · Fixed by #641
Assignees
Labels
Extensions: DSL Mapping Studio Core Team Opened by a member of the Studio core team Type: Bug
Milestone

Comments

@kshradhan
Copy link
Contributor

🐛 Bug Report

Changes don't sync when using XStore Association Mapping.

Expected behavior

Workspace should sync without any unsynced file

Reproduction Code or Repo

Use this code

Class model::MapPerson
{
  firstName: String[1];
}

Class model::MapFirm
{
  firstName: String[1];
}

Class model::Person
{
  firstName: String[1];
  lastName: String[1];
}

Class model::Firm
{
  legalName: String[1];
}

Association model::FirmPerson
{
  firm: model::Firm[1];
  employee: model::Person[1];
}


###Mapping
Mapping model::NewMapping
(
  *model::Firm[firm]: Pure
  {
    ~src model::MapPerson
    legalName*: $src.firstName
  }
  *model::Person[person]: Pure
  {
    ~src model::MapFirm
    firstName: $src.firstName
  }

  model::FirmPerson: XStore
  {
    firm[person, firm]: $that.legalName == $this.firstName
  }
)

Possible Solution

This could be a hashing issue.

Additional context

image

@kshradhan kshradhan added Type: Bug Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug labels Sep 27, 2021
@kshradhan kshradhan self-assigned this Sep 27, 2021
@akphi akphi removed the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Sep 29, 2021
@akphi akphi modified the milestones: 0.7.0, 0.8.0 Sep 29, 2021
@kshradhan
Copy link
Contributor Author

These two lines are the issue. on the line 31 of v1 property pointer, value of this.class comes out to be the correct model::FirmPerson

and on the line 74 in PropertyReferenc.ts the value for this.ownerReference.hashValue this comes out to be model::Person

also this following comment mentions this property to be implicit:

@MauricioUyaguari MauricioUyaguari modified the milestones: 0.8.0, 0.9.0, 0.10.0 Oct 7, 2021
@github-actions github-actions bot modified the milestones: 0.10.0, 0.11.0 Oct 18, 2021
@github-actions github-actions bot modified the milestones: 1.0.0, 2.0.0 Oct 27, 2021
@akphi akphi added the Studio Core Team Opened by a member of the Studio core team label Oct 29, 2021
@MauricioUyaguari MauricioUyaguari self-assigned this Nov 3, 2021
@akphi akphi closed this as completed in #641 Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Extensions: DSL Mapping Studio Core Team Opened by a member of the Studio core team Type: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants