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
Given this code:
Collection<Document> ccc = getCollection(true); ccc.insertOne(new Document("1") .append("isCheckedOut", true) .append("numberOfPages", 1) .append("color", "blue")); Filter filter = Filters.and( Filters.eq("isCheckedOut", false), Filters.lt("numberOfPages", 10)); Update update = Updates.set("color", "yellow"); CollectionUpdateOneOptions options = new CollectionUpdateOneOptions().upsert(true); CollectionUpdateResult result = ccc.updateOne(filter, update, options); System.out.println(result.getMatchedCount()); System.out.println(result.getModifiedCount()); System.out.println(result.getUpsertedId());
we got an error because upsertIdis not an Integer and was read as one.
upsertId
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Given this code:
we got an error because
upsertId
is not an Integer and was read as one.The text was updated successfully, but these errors were encountered: