Xata logo
Xata
Create
Home
Feedback
Xata Lite Feature Requests
147
Voters
h4ckedneko
José dBruxelles
Lucas Bonafé
Louis Kapp
J
Jonathan Furness
Manohar Maharshi
Marlon Ugocioni Marcello
Elcio Paludo
Jamal .S
R
Rashid Armand
and 31 more...
Powered by Canny
Enhanced many-to-many relations support
planned
member badge
Kostas Botsas
September 29, 2022
member badge
Kostas Botsas
In anticipation of further improvements in the joins/many-to-many relations model, the reverse link traversing described in https://feedback.xata.io/feature-requests/p/reverse-link-relations can help simplify querying relations.
This upcoming "backwards link access" method using the
<- table.column
notation enables retrieving multiple users and their posts (records from another table which are linking to the current queried users table) in a single request. This feature is available in the REST API, Typescript SDK and UI support coming soon.
·
August 11, 2023
·
Reply
member badge
Kostas Botsas
marked this post as
planned
·
August 11, 2023
·
Reply
member badge
Alex Francoeur
From Discord: https://discord.com/channels/996791218879086662/1084580138236264539/1084860672124403743
1:M table relationship support
(one product can have multiple images)
(so that I'd only have to do "product.images" in my select part of the query and it would get all the images that are linked to that product)
·
March 13, 2023
·
Reply
Rafael Garcia
I'd love to be able to easily fetch N-relationships in a single request, something like
const users = await xata.db.Users.select(["name", "friends.name"]).getMany();
{
"friends": [
{ "name": "John", id: "a", "xata": { "version": 1 }},
{ "name": "Mary", id: "b", "xata": { "version": 1 }},
]
"id": "myid",
"name": "Keanu Reave",
"xata": { "version": 1 }
}
·
February 23, 2023
·
Reply
Jake
This would make things much easier and cleaner to work with. Great suggestion.
·
February 11, 2023
·
Reply
member badge
Kostas Botsas
For 1 to many relations (1:M) it would be helpful to support array of links.
·
January 16, 2023
·
Reply
member badge
Kostas Botsas
Add support for action triggers in many-to-many relations to make waterfall operations through a link relation. i.e.: when a post record is deleted, remove its like records. (cascade)
·
December 3, 2022
·
Reply
member badge
Kostas Botsas
Currently, many-to-many relations can be implemented in a "junction" table with two or more columns of link type. Entries in the junction table act as relation definitions across records in different tables, tying together each side of the many-to-many relation.
Xata should support a native method to create many to many relations.
If you have a preferred way in which you would like to see this area addressed, please leave your comments here!
·
September 29, 2022
·
Reply
Powered by Canny