Q: MongoDB Reference ObjectID from the same table I want to do a category table that have a parent category by referencing the ObjectId from the same table.
Is it a normal practice or bad practice to refer ObjectId from the same table? If this is wrong, how do I go about it?
const CategorySchema = new Schema({
    title: String,
    description: String,
    thumbnail: String,
    image: String,
    parentCategory: {
            type: Schema.Types.ObjectId,
            ref: 'category',
    },
})

module.exports = mongoose.model('category', CategorySchema)

