проверил это и работает. Я буду голосовать.

уйста, посмотрите на мой код. У меня ошибка проверки, но я уверен, что я разместил свои документы в правильном формате.

МОЯ МОДЕЛЬ

var mongoose = require('mongoose');
var Schema = mongoose.Schema;

var orderSchema = new Schema({
    userPurchased: { type: Schema.Types.ObjectId, ref: 'users' },
    products: [
        {
            product: { type: Schema.Types.ObjectId, ref: 'products' },
            size: { type: String, required: true },
            quantity: { type: Number, required: true },
            subTotal: { type: Number, required: true }
        }
    ],
    totalQuantity: { type: Number },
    totalPrice: { type: Number },
    otherShipAd: { type: String },
    modeOfPayment: { type: String },
    paidStatus: {type: Boolean, default: false}
});

module.exports = mongoose.model('orders', orderSchema);

МОЙ МАРШРУТ

ordersRouter.route('/placeOrder')
        .post(function (req, res) {
            var body = req.body;
            console.log(req.body);
            var orderItem = {
                userPurchased: body.userId,
                products: [{
                    product: body._id,
                    size: body.size,
                    quantity: body.quantity,
                    subTotal: body.subTotal
                }],
                totalQuantity: body.totalQuantity,
                totalPrice: body.totalPrice,
                otherShipAd: body.customAdd,
                modeOfPayment: body.modeOfPayment
            };
            Orders.create(orderItem, function (err, result) {
                if (err) throw err;
            });
        });

МОЙ JSON ОБЪЕКТ ОТ ПОСТМЕНА

{
    "userPurchased": "5887f303c58a953360fe2759",
    "products": [{
        "product": "58466e8e734d1d2b0ceeae00",
        "size": "m",
        "quantity": 3,
        "subTotal": 1197
    },
    {
        "product": "58466e8e734d1d2b0ceeae00",
        "size": "l",
        "quantity": 3,
        "subTotal": 1197
    }],
    "totalQuantity": 6,
    "totalPrice": 2394,
    "otherShipAd": "",
    "modeOfPayment": "BDO"
}

Пожалуйста, посмотрите мою трассировку стека ошибок

РЕДАКТИРОВАТЬ: Результат req.body

Что я здесь не так делаю? Я застрял.

Ответы на вопрос(2)

Ваш ответ на вопрос