I am creating a sports app. we have leagues that we have a league_teams attribute that is a relastionship with our league_teams collection. I used this code const newTeam = await databases.updateDocument( process.env.NEXT_PUBLIC_APPWRITE_DATABASE!, process.env.NEXT_PUBLIC_APPWRITE_COLLECTION_LEAGUES!, leagueId, { leagueTeams: [ { $id: ID.unique(), name: teamName, players: players, }, ], } );
did add the new team to the relationship, but it removed all of the other teams that had relastionships with the collection.
Is there a way to add and remove 1 team at a time to the relationship in one step, or will I need to create the team in the teams colection and then add it to the relationship attribute?
Recommended threads
- listRows result parsing issue
I'm using Appwrite Dart SDK "24.2.0". When I perform a listRows call in dart, I have this reponse in JSON: in " Future<models.RowList> listRows()" { "total" :...
- Index for combination of columns
How am i suppposed to apply index so that combination of two columns alwasy remain unique in appwrite table though console
- Broken Flutter SDK >=24.1.0
Row.fromMap now does: ``` data: Map<String, dynamic>.from(map["data"] ?? {}) ``` But Appwrite Cloud TablesDB row responses return custom row columns flattene...