Closed
Description
Hello,
i'm have an issue regarding usage of Aggregation annotation on spring-data-mongodb
What i'm encounter is
Cannot invoke "org.bson.Document.isEmpty()" because "source" is null
This happen when collection empty (not have any document) but if have an document, i'm not encounter the error.
Here some snippet of code i'm using:
@Aggregation(
"{" +
"\$project: { maxid: {\$max: '\$_id'} }" +
"}"
)
fun getMaxUnitID(): String?