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

toSerializable omits link columns #1175

Closed
kostasb opened this issue Sep 15, 2023 · 0 comments · Fixed by #1180
Closed

toSerializable omits link columns #1175

kostasb opened this issue Sep 15, 2023 · 0 comments · Fixed by #1180
Assignees
Labels
bug Something isn't working needs-triage

Comments

@kostasb
Copy link
Contributor

kostasb commented Sep 15, 2023

Describe the bug
Calling toSerializable on a record omits linked columns.

Repro steps
Reproduced with client 0.26.5:

const results = await xata.db.one.select(["*", "mylink.*"]).getAll();

for (const res of results) {
  const res_ser = res.toSerializable();
  console.log(res);
  console.log(res_ser);
}

Results:

// record:
{
  "id": "rec_ck20o0j004smhor4oh9g",
  "mylink": {
    "id": "rec_ck20nusmtttmmmr6kgag",
    "linkedstring": "two",
  },
  "mystring": "one",
}

// serialized record is missing mylink.linkedstring:
{
  "id": "rec_ck20o0j004smhor4oh9g",
  "mylink": "rec_ck20nusmtttmmmr6kgag",
  "mystring": "one"
}
@kostasb kostasb added the bug Something isn't working label Sep 15, 2023
@SferaDev SferaDev self-assigned this Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants