Skip to content

Field Mapping #1068

Closed
Closed
@haorancui94

Description

@haorancui94

I want my userId in code to be user_id field in document.
I was using the field to converting the field with
@Field(name = "user_id")
but it won't work

instead if I use:
@Field(value = "user_id")
it will work

I know in the doc it told us to use @Field("user_id")

But I check the code, might be the code has written in the opposite way that caused this problem?

         /**
	 * The key to be used to store the field inside the document. Alias for {@link #name()}.
	 *
	 * @return an empty {@link String} by default.
	 */
	@AliasFor("name")
	String value() default "";

	/**
	 * The key to be used to store the field inside the document. Alias for {@link #value()}.
	 *
	 * @return an empty {@link String} by default.
	 */
	@AliasFor("value")
	String name() default "";

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