Type mismatch: cannot convert from CascadeType to CascadeType[]

@Cascade(CascadeType.ALL)

In the above association mapping the following error: Type mismatch: cannot convert from CascadeType to CascadeType[]

At this time, it is because the package reference of CascadeType is wrong, and the correct reference is as follows:

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

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326619481&siteId=291194637