Skip to content

"@JsonApiRelation mappedBy" looks for a property named "id" instead of using @JsonApiId #884

@lgringo

Description

@lgringo

Using example from documentation 👍
`
@JsonApiResource(type = "tasks")
public class Task {

@JsonApiId
private String uid;

@JsonApiRelation
private Project project;

...

}

@JsonApiResource(type = "project")
public class Project {

@JsonApiRelation(mappedBy="project")
private Set<Task> tasks;

...

}
`

Calling "/project&include=tasks", tasks will be not be added to response.
Renaming uid to id make it works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions