Hibernate version: Annotations 3.2
Hi,
I'm having compilation problems when trying to use Hibernate's CascadeType. I get these errors no matter which CascadeType I use as long as it is from org.hibernate.annotations.CascadeType.
Code:
import javax.persistence.ManyToMany;
import org.hibernate.annotations.CascadeType;
class Customer {
private Order orders;
@ManyToMany(cascade=CascadeType.LOCK)
public Order getOrders() {
return orders;
}
}
I get the compilation error:
Type mismatch: cannot convert from CascadeType to CascadeType[]
if I change the cascade to:
Code:
@ManyToMany(cascade={CascadeType.LOCK})
I get the compilation error:
Type mismatch: cannot convert from CascadeType to CascadeType
Is this a bug or am I don't something wrong?