Hello Everyone, The hibernate cascade annotation value "org.hibernate" is conflicting with the variable "org", it's taking "org" as variable name, not part of the package name. I am getting error:
.java:[14,16] cannot find symbol [ERROR] symbol : variable hibernate [ERROR] location: class java.lang.Object [ERROR] Foo.java:[14,50] an enum annotation value must be an enum constant
It seems to be a generic Java compiler bug. I am using the online compiler to compile the program from here https://www.interviewbit.com/online-java-compiler/ and Should be reproducible when you define an object variable that is the same as the first package element.
import javax.persistence.CascadeType; import javax.persistence.OneToMany; import org.hibernate.annotations.Cascade; public class Foo { Object org; @OneToMany @Cascade(org.hibernate.annotations.CascadeType.DELETE_ORPHAN) Object foo; @OneToMany(cascade=CascadeType.ALL) Object foo2; }
Hello, I'm not sure this forum can assist. This is for users of the Arm Compiler for Embedded, and associated tools.https://developer.arm.com/tools-and-software/embedded/arm-compiler