In hibernate, there are many information about set cascade to "all, delete" and so on, but I want to know the effect of set cascade to "none"
now I have a class Parent, and it's child-class Child,
class Parent{
List<Child> childs;
....}
and in the file parent.hbm.xml(I omitted other content)
<class name="Parent" table="parent" >
<bag name="childs" lazy="false" table="parenthaschildsTable" cascade="none">
<key>
<column name="parentId" not-null="true"/>
</key>
<one-to-many class="Child">
<column name="childId" not-null="true"/>
</one-to-many>
</bag>
when save the parent, I don't want to cascade update his childs, so I set cascade="none"
.
my question is :
I set the cascade is "none", if I add a child#1 to parent, then I save the parent, can hibernate insert a new record to the table parenthaschildsTable, but not cascade the Child?