Fehlende Methoden für Games Datenbank inplementieren #76
@@ -65,7 +65,6 @@ class GameDao extends DatabaseAccessor<AppDatabase> with _$GameDaoMixin {
|
||||
|
||||
/// Adds a new [Game] to the database.
|
||||
/// Also adds associated players and group if they exist.
|
||||
/// If a game, player, or group already exists, it will be replaced.
|
||||
Future<void> addGame({required Game game}) async {
|
||||
await db.transaction(() async {
|
||||
|
sneeex marked this conversation as resolved
Outdated
|
||||
await into(gameTable).insert(
|
||||
|
||||
Reference in New Issue
Block a user
warum steht hier if a game player or group exists it will be replaced? bezieht sich das auf das game, bzw. die group/den player im game? Vorhin meintest du doch das replace funktioniert nicht so
Das Replacen funktioniert nicht bei den Verbindungstabellen, aber bei Entity-Tabellen schon. Bei den Verbindungstabellen sind beide Schlüssel zusammen primary key und deswegen kann da nichts ersetzt werden, weil die primary keys beim ersetzen gleich bleiben, nur die anderen attribute ändern sich