Hibernate Type mismatch: cannot convert from CascadeType to CascadeType[]

@ManyToOne(cascade=CascadeType.ALL)报错:

Type mismatch: cannot convert from CascadeType to CascadeType[]

原因:import 引用错误

解决方案:

把import org.hibernate.annotations.CascadeType改为-->import javax.persistence.CascadeType;

你可能感兴趣的:(Hibernate,type,cannot,cascadetype,mismatch)