Commit e67ecb5
fix: use SELECT COUNT(1) instead of SELECT VALUE COUNT(1) in aggregate serializer test
Custom serializers' deserialize(Map<String, Object>, Class<T>) API is designed
for object-to-POJO mapping. SELECT VALUE COUNT(1) returns a scalar that gets
wrapped in a {"_value": N} Document by the aggregate pipeline, which cannot
be deserialized as Integer.class through a custom serializer.
Changed to SELECT COUNT(1) which returns an object {"$1": 3} that properly
goes through the Map-based deserialization path.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 8337dcd commit e67ecb5
1 file changed
Lines changed: 9 additions & 5 deletions
Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
771 | 771 | | |
772 | 772 | | |
773 | 773 | | |
774 | | - | |
775 | | - | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
776 | 780 | | |
777 | | - | |
| 781 | + | |
778 | 782 | | |
779 | | - | |
| 783 | + | |
780 | 784 | | |
781 | 785 | | |
782 | 786 | | |
783 | 787 | | |
784 | | - | |
| 788 | + | |
785 | 789 | | |
786 | 790 | | |
787 | 791 | | |
| |||
0 commit comments