配置JPA的时候多对多关系,报以下错误:
org.hibernate.AnnotationException: Illegal use of mappedBy on both sides of the relationship: com.csair.gme.core.domain.ComponentType.componentPropertys
解决办法:
不能两边都用mappedBy,只能用一边,而且用mappedBy的那一边是从表,另外一边就是主表。mappedBy=‘主表里的变量名’