Spring data JPA- Hibernate Many to Many relation is inserting null in link entity table

前端 未结 2 1363
孤城傲影
孤城傲影 2021-01-27 03:36

I have many to many relation between user to role

USER ENTITY:

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import         


        
2条回答
  •  一生所求
    2021-01-27 04:22

    try saving the role also, you haven't stored the role after changing it in addrole function in user entity.

提交回复
热议问题