私のコメントに加えて、私がテストした例を次に示します。
MongoDB shell version: 2.0.6
connecting to: test
> db.classrooms.insert({"example": "field", "c_type" : "Open"});
> db.classrooms.insert({"example": "array", "c_type" : ['Available']});
> db.classrooms.insert({"example": "obj", "c_type" : {'Booked' : 'Yes'}});
> db.classrooms.find()
{
"_id" : ObjectId("502abd4a332f362f58906683"),
"example" : "field",
"c_type" : "Open"
}
{
"_id" : ObjectId("502abd4e332f362f58906684"),
"example" : "array",
"c_type" : [
"Available"
]
}
{
"_id" : ObjectId("502abd53332f362f58906685"),
"example" : "obj",
"c_type" : {
"Booked" : "Yes"
}
}
> db.classrooms.update(
{ "c_type" : { $exists : true } },
{ $unset : { "c_type" : 1 } },
false, // upsert
true); // update multiple records
> db.classrooms.find()
{ "_id" : ObjectId("502abd4a332f362f58906683"), "example" : "field" }
{ "_id" : ObjectId("502abd4e332f362f58906684"), "example" : "array" }
{ "_id" : ObjectId("502abd53332f362f58906685"), "example" : "obj" }