Skip to content

Minimal reproducible example for Spring Data MongoDB issue #4812

License

Notifications You must be signed in to change notification settings

gbaso/spring-data-mongodb-4812

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spring-data-mongodb-4812

Minimal reproducible example for Spring Data MongoDB issue #4812

Minimal conversion example

See AggregationContextTest for a minimal sample to reproduce the issue. The test parses a document and then converts it using AggregationContext#getMappedObject. The test fails, due to the args array being converted from empty array to null.

Realistic example

See AggregatorIT for a real life example. The class under test creates an aggregation pipeline via the Aggregation API, which works correctly, and via parsing a json to create a pre-rendered Document. The latter fails when sent to MongoDB.

A workaround is provided where an unused argument is specified, preventing the conversion to null.

About

Minimal reproducible example for Spring Data MongoDB issue #4812

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages