简体   繁体   中英

Update a resource with associations in spring-data-rest

Let's say I have a AFolder class with name, description and a List<AFile> as an attribute. Now assume that I have created a AFolder object with its list of AFile populated. If I try to update using PUT/PATCH with something like {"name": "new name", "description": "new description"} then the list of AFile came back empty

How to resolve this problem?

看起来您正在遇到此问题该问题已在Spring Data REST 2.1.1中修复。

奇怪的是,当我使用Spring Data Rest 2.2.0.RELEASE时,我也遇到了这种情况,并在将版本更改为2.1.1时解决了此问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM