Oracle Rest Data Services (ORDS) (MOSC)

MOSC Banner

Query errors for ObjectIds when using MongoDB driver on ORDS23.1 with Oracle 21c

After setting up ORDS 23.1 with my Oracle 21c database, I am unable to perform queries via the ORDS mongodb driver which utilize an ObjectID on any field other than _id.

Setup: Oracle 21c Database, ORDS 23.1

Reproduction steps:

  1. Setup an user with a new SODA/MongoDB schema
  2. Connect up to the collection via any MongoDB client (e.g. Compass)
  3. Create a new collection
  4. Create a new document
  5. Add a new field to the document with the type ObjectId (e.g. { _id: ObjectId(...), uid: ObjectId(...) })
  6. Run a query which uses a ObjectId as the query value (e.g db.myCollection.find({ uid: ObjectId("64a79d9016399b2c9fedf141") })

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center