Objects with json columns after a summaries request provide properties as strings
Hi team,
We are trying to run a summaries like:
const summary = await xata.db.items.summarize({
columns: ["linkedTable.*"],
summaries: {},
filter: {
"anotherLinkedTable.someProperty": "someValue",
},
});
the result comes as:
we would expect:
And we are getting the results but the objects we get from the linkedTable have their JSON columns coming back as a string.
If we do a xata.db.linkedTable.read(linkedTable.id), we do get an object whose JSON columns are objects, and not a string.
5 Replies
That does sound like a bug, checking with the team and will report back
Any news on this topic?
Hey Eusebio, I agree it's a bug but unfortunately we haven't fixed yet. We've added an issue for it to the client-ts public repo: https://github.com/xataio/client-ts/issues/1215 and discussing it with our SDK dev team.
Oh, ok, thanks for the information. No worries, no rush. Happy to help if we can, I can provide (via DM) the workspace and the queries we've got.
Thanks a lot for willing to help! Basic repro of the issue is pretty straightforward, be it via a native or linked column, and I agree that the JSON formatting should be respected in the response from the summarize call. We'll let you know in case the SDK dev team has any comments or requests for input