- ordinamento per Data

This commit is contained in:
Surya Paolo
2024-06-21 16:11:03 +02:00
parent c3cc344b9f
commit 1c7b89a55b
7 changed files with 51 additions and 48 deletions

View File

@@ -61,9 +61,9 @@ const productSchema = new Schema({
active: {
type: Boolean,
},
arrversioni: [{
versione: {
type: Number,
}],
},
status: { //publish
type: String,
},
@@ -500,6 +500,20 @@ module.exports.findAllIdApp = async function (idapp, code, id, all) {
as: 'productInfo.authors'
}
},
{
$lookup: {
from: 'publishers',
localField: 'productInfo.idPublisher',
foreignField: '_id',
as: 'productInfo.publisher'
}
},
{
$unwind: {
path: '$productInfo.publisher',
preserveNullAndEmptyArrays: true,
},
},
{
$lookup: {
from: 'catprods',