- Does MongoDB handle consistency for linked documents that come from a TTL collection ?
e.g: If the "User" model is referring to a TTL collection and one of the linked users is removed for being too old, will it's links to various groups be removed ?
var GroupSchema = new Schema({
users : [{
type : Schema.Types.ObjectId, ref: 'User'
}]
});
mongoose.model('Group', GroupSchema);
- If not, what are the best practices for handling lists of linked documents that were removed due to TTL ?
In CouchDB you can listen to events triggered by I/O operations I think, are there any similar mechanisms in place or being implemented currently for MongoDB ?
If it matters, I'm using the Node.js Mongoose ODM.
Thank you in advance !