Eventually, I found the cause… So the problem is that in Spring Data 3.x when I use group like:
Aggregation.group( FieldOne, FieldTwo, FieldThree )
I will have as result the next aggregation:
Document { _id: Document { [FieldOne: X, FieldTwo: Y, FieldThree: Z] }, FieldOne: X, FieldTwo: Y, FieldThree: Z }
I have CodecConfigurationExcpetion because _id: [FieldOne: X, FieldTwo: Y, FieldThree: Z] can not be cast to UUID…
Composite ids from Aggregation.Group() are no longer mapped to their respective fields. Jeff, could you please provide some info on how to deal with such a case, and is there any way to reverse/configure this?