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 9015323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:43:25+00:00 2026-06-16T03:43:25+00:00

finding a record with dot notation is possible via mongo shell for example: db.events.find({‘events.eid’:307215649389788})

  • 0

finding a record with dot notation is possible via mongo shell for example:

db.events.find({'events.eid':307215649389788})

I’m trying to achieve the same thing with java drivers, problem is:

  • db.getCollection(collectionName).find(query) – expects query as a DBObject.
  • when creating DBObject with ‘events.eid’ as key, the constructor adds “” so I get the following result : “‘events.eid'” as key which won’t work (also in shell).

how can I overcome this?

  • 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-16T03:43:26+00:00Added an answer on June 16, 2026 at 3:43 am

    Not quite sure what you’re trying, but this works:

    DBCursor cursor = coll.find(new BasicDBObject("events.eid", 307215649389788));
    

    You need to use double quotes (") with Java strings so if you’re using single quotes that’s your problem.

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

Sidebar

Related Questions

I have a basic problem. I need to find the guid of a record
I've been searching and i can't find any ff addons or javascript for finding
I m trying to delete a record from a SQLiteDB via Android Application,This is
I am trying to find the identity value of an inserted record inserted by
I'm trying to write a query that combines finding a particular record (identified by
I need to set a Lable on a contact record based on finding a
Possible Duplicate: Finding duplicate values in a SQL table I'm completely new to T-Sql
Is the A* path finding algorithm guaranteed to find the shortest path 100% or
So, I've found several examples for finding a random record in Rails 2 --
I have changed the date format of field, however its not finding the record

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.