Skip to content

Support storeNullValue and storeEmptyValue for property that is annotated with @MultiField annotation #2952

Closed
@donghuantang

Description

@donghuantang

Currently storeNullValue and storeEmptyValue are supported for property that is annotated with the @field annotation. Need to also add support for property that is annotated with @MultiField annotation. Suggesting the following code change in the SimpleElasticsearchPersistentProperty class:

In the SimpleElasticsearchPersistentProperty constructer, update the assignment of storeNullValue and storeEmptyValue to also check the mainField parameters in the @MultiField annotation:

storeNullValue = (isField && getRequiredAnnotation(Field.class).storeNullValue()) || (isAnnotationPresent(MultiField.class) && getRequiredAnnotation(MultiField.class).mainField().storeNullValue()); storeEmptyValue = isField ? getRequiredAnnotation(Field.class).storeEmptyValue() : isAnnotationPresent(MultiField.class) ? getRequiredAnnotation(MultiField.class).mainField().storeEmptyValue() : true;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions