a new object was found through a relationship that was not marked cascade PERSIST

后端 未结 4 1212
忘掉有多难
忘掉有多难 2020-12-08 19:35

In trying to get a @OneToMany relationship between Article and HeaderField I probably have the mapping not quite right, resulting in:<

4条回答
  •  渐次进展
    2020-12-08 20:04

    I removed the cascade attribute and it worked for me:

    OneToMany(mappedBy = "article")  
    private List someOrAllHeaderFields = new ArrayList<>();
    

提交回复
热议问题