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
repo.UpdateOneAsync( filter: show => show.Id == showId, update: upd => upd .Set(Builders<T>.ArrayFiltersReference .SelectArray(x => x.Seasons, "a") .ThenSelectArray("b", x => x.Episodes), DateTime.Today), options: new UpdateOptions { ArrayFilters = Builders<T>.ArrayFilters .AddFilter<Season>("a", season => season.Year == 2022) .AddFilter<Episode>("b", episode=> episode.Number == 5) } ) // genererar reference: "Seasons.$[a].Episodes.$[b].ReleaseDate" // Genererar filter: { "a.Year": { $eq: 2022 } "b.ReleaseDate": { $eq: 5 } }
The text was updated successfully, but these errors were encountered:
var filter = Builders<Channel>.Filter.Eq(x => x.Id, "5e4606e6ae7b090688671416"); var like = new Like() {Name = "new like", Id = "1"}; var episodeId = "5e46071d385a672b0cea0f86"; var trackId = "5e460dbe2bc5e70c9cfeac21"; var update = Builders<Channel>.Update.Push("Episodes.$[e].Tracks.$[t].Likes", like); var arrayFilters = new List<ArrayFilterDefinition>(); ArrayFilterDefinition<BsonDocument> episodesFilter = new BsonDocument("e._id", new BsonDocument("$eq", episodeId)); ArrayFilterDefinition<BsonDocument> tracksFilter = new BsonDocument("t._id", new BsonDocument("$eq", trackId)); arrayFilters.Add(episodesFilter); arrayFilters.Add(tracksFilter); var updateOptions = new UpdateOptions { ArrayFilters = arrayFilters };
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: