default value for CascadeType in Hibernate
I am using Hibernate to persist this bean.
import javax.persistence.*;
@Entity
public class Person {
@Id @GeneratedValue
private int id;
@Column
private String name;
@OneToOne
private Address addr;
}
What is the CascadeType
for addr
?
CascadeType defaults to the empty array . See CascadeType in Annotation Type OneToOne
By default no operations are cascaded.
You can check the source of @OneToOne
at here . No operations are cascaded by default
/**
* (Optional) The operations that must be cascaded to
* the target of the association.
*
* <p> By default no operations are cascaded.
*/
CascadeType[] cascade() default {};
Read more: http://kickjava.com/src/javax/persistence/OneToOne.java.htm#ixzz1d6ZWMM2y