Skip to content

Null items in collections mapping #2684

@Chuckame

Description

@Chuckame

Context

Collection mapping output can contains nulls if the corresponding mapping method returns null.

To prevent having null items, 2 solutions:

  • Having an after method that is removing all null items
  • implement a method that is taking a list, mapping item per item, filter null items

Non goal

Complex filtering with custom classes and/or annotations

Proposal

I saw multiple null strategies.

We can add an collectionNullItemMappingStrategy allowing filtering output to only get non-null items into generated collections

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions