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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:14:04+00:00 2026-06-17T09:14:04+00:00

Today I try to $set a DBRef with $db to collection. But server say:

  • 0

Today I try to $set a DBRef with $db to collection.

But server say: “not okForStorage” , so operation is failed.

ps. my mongod version is 2.2

{
  "ts" : ISODate("2013-01-16T14:05:42.814Z"),
  "op" : "update",
  "ns" : "mydb.coll1",
  "query" : {
    "_id" : NumberLong("928686353793211381")
  },
  "updateobj" : {

    "$set" : {
    "ref" : {
      "$db" : "db2",
      "$ref" : "coll2",
      "$id" : NumberLong("928686353793211381")
      }
    }
  },
  "nscanned" : 1,
  "keyUpdates" : 0,
  "numYield" : 0,
  "lockStats" : {
    "timeLockedMicros" : {
      "r" : NumberLong(0),
      "w" : NumberLong(200)
    },
    "timeAcquiringMicros" : {
      "r" : NumberLong(0),
      "w" : NumberLong(5)
    }
  },
  "exception" : "not okForStorage",
  "exceptionCode" : 12527,
  "millis" : 0,
  "client" : "10.168.89.9",
  "user" : ""
}
  • 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-17T09:14:05+00:00Added an answer on June 17, 2026 at 9:14 am

    According to the docs, the order of the fields in the DBRef matters; so you’d need to reorder your ref object as:

    "ref" : {
      "$ref" : "coll2",
      "$id" : NumberLong("928686353793211381"),
      "$db" : "db2"
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to set the focus on ListView but onItemSelected - not work, here
Until yesterday everything was normal but today i try to lauch my application using
I am trying to insert today's date and try increment the date recursively. but
I have been using Tperlregex for some time. but today when I try to
Today I got a project written in PHP. There's an error when I try
My IDE has been working very well, until today. When I try to compile
wget is helpful in my data mining projects. Today I try to wget the
I'm having an extremely difficult day today. I've installed the latest version on Titanium
Today I wanted to try the localization feature of iOS. I added a Localizable.strings
This really has my stumped today. I'm sure its simple, but... Here is my

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.