Skip to content

Nested Collections with MongoItemWriter [BATCH-2419] #1184

Open
@spring-projects-issues

Description

@spring-projects-issues

Ajit Pendse opened BATCH-2419 and commented

While using MongoItemWriter with a custom item processor generating List<Item>, writer receives a nested list as List<List<Item>>. This later fails while trying to convert this list into a BasicDBObject (through MongoTemplate.save() method).

Specifically, the toDbObject() method of MontoTemplate tries to use MappingMongoConverter to convert each List<Item> into BasicDBObject and fails. Ideally, this can be auto-detected and unwrapped to write out individual 'Item's instead of trying to convert the List into BasicDBObject.

As a work-around, a custom converter may work with MongoMappingConverter.


Affects: 3.0.4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions