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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T15:05:40+00:00 2026-06-10T15:05:40+00:00

I`m new to MongoDB and i just successfully migrated from MS SQL to MongoDB.

  • 0

I`m new to MongoDB and i just successfully migrated from MS SQL to MongoDB. When i made my custom classes for MongoDB collections i had some extra property whitch i dont need it.

How i can remove it?

For example lets say i have basic class

public class Basic {

public ObjectId _id {get;set;}
public string Name {get;set;
public string Description {get;set;

}

Then i store some item in Mongo

var collection = Mongo.GetCollection<Basic>("basic");
var item = new Basic{ Name = "TestName", Description = "Remove me"};
collection.insert(item);

When i make changes for example i dont need Description property in my Basic class, i want to remove every Description property in all documents.

  • 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-10T15:05:42+00:00Added an answer on June 10, 2026 at 3:05 pm

    You can execute a mass update. This is how you do it in mongo shell:

    db.yourcollection.update({}, {$unset: {description: 1}}, false, true);
    

    Documentation on $unset: http://www.mongodb.org/display/DOCS/Updating#Updating-%24unset
    Documentation on update(): http://www.mongodb.org/display/DOCS/Updating#Updating-update%28%29

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

Sidebar

Related Questions

I'm new to MongoDB and trying out some fundamentals, but this astonished me. I'm
i am very new to MongoDB and NoSQL in general and i've just started
I'm new to MongoDB. Just wondering: How do I convert this shell command to
I think its fair to say I'm pretty new to MongoDB having just installed
I'm new in mongodb and can't find the solution. I'm using mongo-php-driver I just
I'm pretty new to MongoDB and MapReduce. I need to do some MapReduce on
Just wanted to ask some advice when building a database with mongodb, I have
Ok I am new to MongoDB and been reading a book about it, some
I am new to the mongo db.I just installed it over my ubuntu 11.04
So i'm new with mongodb and mapreduce in general and came across this "quirk"

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.