Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
https://www.crnk.io/releases/stable/documentation/#_jsonapirelation
@JsonApiRelationId 有什么需要,因为我认为不使用它没有区别?
当您只需要对 ID 进行操作时,您可以使用@JsonApiRelationId而@JsonApiRelation不是在整个相关资源上进行操作,或者当相关资源的 id 可以获得比完整资源便宜得多时。
@JsonApiRelationId
@JsonApiRelation
两者都可能如下所示:
public class Car { ... @JsonApiRelationId private Long ownerId; @JsonApiRelation private Person owner;