title: Is there a way in Hibernate to set not-null to true on save but not delete in a mapping config?
body: <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"&gt;
  &lt;hibernate-mapping package="org.lexiclan.orm.dao"&gt;
   &lt;class name="Address" table="ADDRESSES" lazy="false"&gt;
    &lt;id name="addressId" column="ADDRESS_ID"&gt;
     &lt;generator class="native" /&gt;
    &lt;/id&gt;
    &lt;many-to-one name="addressType" column="ADDRESS_TYPE_ID" not-null="true" class="AddressType" lazy="false" /&gt;
    &lt;many-to-one name="contact" column="CONTACT_ID" not-null="true" class="Contact" lazy="false" /&gt;
    &lt;property name="address1" column="ADDRESS_1" /&gt;
    &lt;property name="address2" column="ADDRESS_2" /&gt;
    &lt;property name="city" column="CITY" /&gt;
    &lt;property name="stateProvince" column="STATE_PROVINCE" /&gt;
    &lt;property name="zipPostalCode" column="ZIP_POSTAL_CODE" /&gt;
    &lt;property name="countryRegion" column="COUNTRY_REGION" /&gt;
   &lt;/class&gt;
  &lt;/hibernate-mapping&gt;
  </code></pre>
  
  <p>In this example, an address requires both a contact and an address type relationship before you can use "Session.save()" (which is what I want), but when I want to use "Session.delete()" I have to also specify a contact and address type relationship because of the not-null. Is there a way to require those values on save, but not on update/delete operations?</p>