Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8519905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:23:00+00:00 2026-06-11T06:23:00+00:00

A very quick question, how am I going to do this below: > db.blog.posts.findOne()

  • 0

A very quick question, how am I going to do this below:

> db.blog.posts.findOne()
{
"_id" : ObjectId("4b253b067525f35f94b60a31"),
"title" : "A Blog Post",
"content" : "...",
"author" : {
    "name" : "joe",
    "email" : "joe@example.com"
     }
}

I saw the answer in Javascript is like:

> db.blog.posts.update({"author.name" : "joe"}, {"$set" : {"author.name" : "joe schmoe"}})

But how am I going to do that in Java?

If I have a very deep level value has to be changed, am I supposed to use this way? like: “person.abc.xyz.name.address” ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T06:23:02+00:00Added an answer on June 11, 2026 at 6:23 am

    Using dot notation to access nested documents will work perfectly well in the Java Driver. Take a look at this StackOverflow answer:

    MongoDB nested documents searching

    For the Java Driver, the basic idea is to replace the Javascript objects with instances of BasicDBObject.

    Here’s another good reference for updating:

    MongoDb's $set equivalent in its java Driver

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I asked this question earlier and I got very quick and helpful responses: Linq
Quick question: I have a very busy form going on that I have developed
Now this is going to be a very absurd question. But what can I
Quick question related to IIR filter coefficients. Here is a very typical implementation of
quick and very basic newbie question. If i have list of dictionaries looking like
Here's a very quick example for my problem: http://img19.imageshack.us/img19/3575/workertool.png (I'm not allowed to post
Very quick question - if I deploy a WPF application to a few users,
Very quick question for FreshBooks OAuth. When requesting a Request Token you need to
Very quick question: should I worry about RSS urls for search engine optimization? Can
very quick question for you. When I store some automatic variable in C, asm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.