- ordinamento per Data
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user