Skip to content

Instantly share code, notes, and snippets.

@tkroll
Last active June 20, 2017 11:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkroll/53fa3e9151d9232e7399e313b503dc97 to your computer and use it in GitHub Desktop.
Save tkroll/53fa3e9151d9232e7399e313b503dc97 to your computer and use it in GitHub Desktop.
Remove errant Phalcon properties in Mongo. Run in the Mongo shell. RE: https://github.com/phalcon/incubator/issues/760
db.getCollectionNames().forEach(function(col) {
db[col].update(
{},
{
$unset: {
"_dependencyInjector":1,
"_modelsManager":1,
"_source":1,
"_operationMade":1,
"_dirtyState":1,
"_connection":1,
"_errorMessages":1,
"_skipped":1
}
},
{multi:1}
)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment