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
When i try to add data to existing doc and the SetOption(merge: true) yet it overwrite the doc it doesn't merge it togather
Task task = Task(title: _taskTitle); String id = "${_getFormatedDay(_taskDate!.day)}-${_taskDate!.day}".trim(); var taskId = db.collection('task').doc().id; var data = { taskId: task.toJson() }; db.collection('tassker').doc(id).set(data, SetOptions(merge: true));
Task task = Task(title: _taskTitle);
String id = "${_getFormatedDay(_taskDate!.day)}-${_taskDate!.day}".trim();
var taskId = db.collection('task').doc().id;
var data = {
taskId: task.toJson()
};
db.collection('tassker').doc(id).set(data, SetOptions(merge: true));
The text was updated successfully, but these errors were encountered:
I've found the same problem. @override Future<dynamic> set(Map<String, dynamic> data, [SetOptions? options]) async { options ??= SetOptions(); if (options.merge) { final output = Map<String, dynamic>.from(data); Map<String, dynamic>? input = _data[id] ?? {}; print(input); output.updateAll((key, value) { input![key] = value; }); _data[id] = input; } else { _data[id] = data; } _utils.set(_data[id], path); }
@override Future<dynamic> set(Map<String, dynamic> data, [SetOptions? options]) async { options ??= SetOptions(); if (options.merge) { final output = Map<String, dynamic>.from(data); Map<String, dynamic>? input = _data[id] ?? {}; print(input); output.updateAll((key, value) { input![key] = value; }); _data[id] = input; } else { _data[id] = data; } _utils.set(_data[id], path); }
Input isn't loaded with old data. It's {} when i reloaded app. So it's not adding new data with old data and overwrites with just new data.
{}
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
When i try to add data to existing doc and the SetOption(merge: true) yet it overwrite the doc it doesn't merge it togather
Task task = Task(title: _taskTitle);
String id = "${_getFormatedDay(_taskDate!.day)}-${_taskDate!.day}".trim();
var taskId = db.collection('task').doc().id;
var data = {
taskId: task.toJson()
};
db.collection('tassker').doc(id).set(data, SetOptions(merge: true));
The text was updated successfully, but these errors were encountered: