We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Reported on client version: 0.29.5
When aliasing a reverse link result with as, the alias is not typed in the returned object.
as
const record = await xata.db.ShoppingCarts.select([{ name: "<-ShoppingCartLineItems.shoppingCart", columns: ["productId", "quantity", "type"], as: "lineItems" }]).getFirst();
The text was updated successfully, but these errors were encountered:
The same type issue applies not just to aliased but to the reverse linked table records
const record = await xata.db.ShoppingCarts.select([ { name: "<-ShoppingCartLineItems.shoppingCart", columns: ["productId", "quantity", "type"], }, ]).getFirst(); console.log(record.<-lacks types);
anything under ShoppingCartLineItemsshoppingCart (included) is not typed.
ShoppingCartLineItemsshoppingCart
raw record response sample:
{ "ShoppingCartLineItemsshoppingCart": { "records": [ { "id": "rec_cq2eqoejtvt7ohj3uh70", "productId": "pid1", "quantity": 1, "type": "item", "xata": { "createdAt": "2024-07-03T06:19:13.319792+00:00", "updatedAt": "2024-07-03T06:19:13.319792+00:00", "version": 0 } } ] }, "id": "rec_cq2eqjskrmoddioegtv0", "xata": { "createdAt": "2024-07-03T06:18:55.023Z", "updatedAt": "2024-07-03T06:18:55.023Z", "version": 0 } }
Sorry, something went wrong.
No branches or pull requests
Reported on client version: 0.29.5
When aliasing a reverse link result with
as
, the alias is not typed in the returned object.The text was updated successfully, but these errors were encountered: