This is a template you can use to report issues. You can also drag images, videos and include Preformatted text
Hello guys I try to display a nested array of objects as a related Datas.
I add the field as an Array of object in the Parent object model .
According to the documentation , it should be displayed as a related Data on the left .
But i can only see it as a JSON in the summary view.
I can’t see any errors in my console.
I guess something on my declaration or in the data i’m sending may be incorrect …
const schema = mongoose.Schema({
_id: mongoose.Schema.Types.ObjectId,
...,
products: [{
id: String,
name: String,
clientCustomization: [ClientCustomization],
baseProduct: String,
baseProduct_id: String,
category_fr: String,
quantity: Number,
unitPrice: Number,
margin: Number,
textile: Boolean,
custom: Boolean,
supplierBaseProductId: String,
owner: String,
status: {
type: String,
enum: ['Active', 'Inactive', 'Locked'],
},
variations: {
color: Variations,
size: Variations,
},
fromStock: Boolean,
shipperSpecificId: String,
preOrder: Boolean,
preOrderInfos: {
moq: Number,
startDate: Date,
endDate: Date,
shippingEstimate: Date,
displayBandOnCustomImage: Boolean,
},
pricing: {
margin: Number,
customizationPrice: Number,
},
},
],
})
module.exports = mongoose.model('Orders', schema, 'Orders')
here -> Orders -> products
Expected behavior
Please describe here the behavior you are expecting.
Actual behavior
What is the current behavior?
Failure Logs
Please include any relevant log snippets, if necessary.
Context
Please provide any relevant information about your setup.
- Package Version: 5.7
- Express Version: 4.16.3
- Sequelize Version:
- Database Dialect: mongodb js
- Database Version:
- Project Name: Panopli