Type mismatch: cannot convert from CascadeType to CascadeType[]

@Cascade(CascadeType.ALL)

在上面的关联映射中如下错误:Type mismatch: cannot convert from CascadeType to CascadeType[]

此时是因为CascadeType的包引用错了,正确引用如下:

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;

猜你喜欢

转载自blog.csdn.net/earthchinagl/article/details/79860877
今日推荐