Can't seem to delete an association...not sure what I"m doing wrong

I've got sales orders and then a one-to-many with sales order details
(ie. line items on the sales order). Can anyone tell me why it keeps
trying to save the record I'm deleting. I'm sure I just don't
understand things with ORM, but I'm not really sure because everything
I find online, I've tried and it doesn't work.

salesOrder.cfc

component output="false" persistent="true" entityname="salesOrder"
table="tw_so_header" singleton {

  //Properties
  property name="docHeaderID" column="Doc_Header_ID" fieldtype="id"
generator="identity";
  property name="soldFromClientID" column="Sold_From_Client_ID"
fieldtype="column";
  property name="soldToClientID" column="Sold_To_Client_ID"
fieldtype="column";
  property name="billToClientID" column="Bill_To_Client_ID"
fieldtype="column";
  property name="docDate" column="Doc_Date" fieldtype="column";
  property name="statusID" column="Status_ID" fieldtype="column";
  property name="totalExtDollars" column="Total_Ext_Dollars"
fieldtype="column" default="0";
  property name="totalFreightDollars" column="Total_Freight_Dollars"
fieldtype="column" default="0";
  property name="transTypeID" column="Trans_Type_ID"
fieldtype="column";
  property name="userID" column="User_ID" fieldtype="column";
  property name="salespersonUserID" column="SalesPerson_User_ID"
fieldtype="column";
  property name="venueID" column="Venue_ID" fieldtype="column";
  property name="isTaxExempt" column="is_Tax_Exempt"
fieldtype="column";
  property name="taxTypeID" column="Tax_Type_ID" fieldtype="column";
  property name="totalTaxDollars" column="Total_Tax_Dollars"
fieldtype="column" default="0";
  property name="totalMiscDollars" column="Total_Misc_Dollars"
fieldtype="column" default="0";
  property name="grandTotalDollars" column="Grand_Total_Dollars"
fieldtype="column" default="0";
  property name="isShipToAddressUsingHeaderOrDetail"
column="Is_Ship_To_Address_Using_Header_Or_Detail" fieldtype="column";
  property name="headerRequestedShipMethodID"
column="Header_Requested_Ship_Method_ID" fieldtype="column";
  property name="headerRequestedShipClassID"
column="Header_Requested_Ship_Class_ID" fieldtype="column";
  property name="headerCustomerPONumber"
column="Header_Customer_PO_Number" fieldtype="column";
  property name="Notes" column="Notes" fieldtype="column";
  property name="contactName" column="contact_name" fieldtype="column";
  property name="contactAddress" column="contact_address"
fieldtype="column";
  property name="contactCity" column="contact_city" fieldtype="column";
  property name="contactState" column="contact_state"
fieldtype="column";
  property name="contactPostalCode" column="contact_postal_code"
fieldtype="column";
  property name="contactPhone" column="contact_phone"
fieldtype="column";
  property name="contactEmail" column="contact_email"
fieldtype="column";
  property name="dateApproved" column="date_approved"
fieldtype="column";

  //Relationships
  property name="client" fieldtype="many-to-one"
cfc="cb.model.client.client" fkcolumn="sold_to_client_id"
missingRowIgnored="true" insert="false" update="false";
  property name="documentStatus" fieldtype="many-to-one"
cfc="cb.model.documentStatus.documentStatus" fkcolumn="status_ID"
missingRowIgnored="true" insert="false" update="false";
  property name="salesPerson" fieldtype="many-to-one"
cfc="cb.model.user.user" fkcolumn="salesperson_user_id"
missingRowIgnored="true" insert="false" update="false";
  property name="salesOrderDetails" fieldtype="one-to-many"
cfc="cb.model.salesOrder.salesOrderDetail" fkcolumn="doc_header_id"
type="array" cascade="all-delete-orphan";
  property name="taxRate" fieldtype="many-to-one"
cfc="cb.model.taxRate.taxRate" fkcolumn="tax_type_id"
missingRowIgnored="true" insert="false" update="false";

}

salesOrderDetails.cfc
component output="false" persistent="true"
entityname="salesOrderDetail" table="tw_so_detail" singleton {

  //Properties
  property name="docDetailID" column="Doc_Detail_ID" fieldtype="id"
generator="identity";
  property name="sKUID" column="SKU_ID" fieldtype="column";
  property name="detailQty" column="Detail_Qty" fieldtype="column";
  property name="unitDollars" column="Unit_Dollars" fieldtype="column";
  property name="extDollars" column="Ext_Dollars" fieldtype="column"
default="0";
  property name="totalQtyShipped" column="Total_Qty_Shipped"
fieldtype="column";
  property name="detailFromUniqueOrderAutoID"
column="Detail_From_Unique_Order_Auto_ID" fieldtype="column";
  property name="detailRequestedShipMethodID"
column="Detail_Requested_Ship_Method_ID" fieldtype="column";
  property name="detailRequestedShipClassID"
column="Detail_Requested_Ship_Class_ID" fieldtype="column";
  property name="detailCustomerPONumber"
column="Detail_Customer_PO_Number" fieldtype="column";
  property name="detailShippingReference"
column="Detail_Shipping_Reference" fieldtype="column";
  property name="detailShippingCombinedYN"
column="Detail_Shipping_Combined_YN" fieldtype="column";
  property name="orderNo" column="order_no" fieldtype="column";
  property name="dealId" column="deal_id" fieldtype="column";
  property name="wholesaleDesc" column="wholesale_desc"
fieldtype="column";
  property name="qtyUnitMeasureId" column="qty_unit_measure_id"
fieldtype="column";

  //Relationships
  property name="dealCode" fieldtype="many-to-one"
cfc="cb.model.dealCode.dealCode" fkcolumn="deal_id"
missingRowIgnored="true" insert="false" update="false";
  property name="qtyUnitMeasure" fieldtype="many-to-one"
cfc="cb.model.lists.qtyUnitMeasure" fkcolumn="qty_unit_measure_id"
missingRowIgnored="true" insert="false" update="false";
  property name="salesOrder" fieldtype="many-to-one"
cfc="cb.model.salesOrder.salesOrder" fkcolumn="doc_header_id"
missingRowIgnored="true" inverse="true";
  property name="skuInventory" fieldtype="many-to-one"
cfc="cb.model.skuInventory.skuInventory" fkcolumn="sku_id"
missingRowIgnored="true" insert="false" update="false";

}

handlers/salesOrder.cfc (update method)

  //update(): method for handling the updating of a sales order
  public void function update(required any event, required any rc,
required any prc){
    //find my record
    if(structKeyExists(rc,'id') && isNumeric(rc.id)){
      rc.salesOrder = salesOrderService.get(rc.id);
      //if you returned a sales order object
      if(structKeyExists(rc,'salesOrder') && isObject(rc.salesOrder)){
        var errors = [];
        rc.states = stateService.getAll();
        rc.qtyUnitMeasures = qtyUnitMeasureService.getAll();
        populateModel(rc.salesOrder);
        if(isSimpleValue(rc.salesOrder.getTaxRate())){
          rc.salesOrder.setTaxRate(taxRateService.get(rc.taxTypeId));
        }else if(isObject(rc.salesOrder.getTaxRate())){
          //do nothing, we assume the object is there
        }else{
  
rc.salesOrder.setTaxRate(taxRateService.get(application.enumerations.taxRates.rutherfordCoTn.id));
        }

        //loop through and add/update/delete details
        if(structKeyExists(rc,'line_count') && isNumeric(rc.line_count)){
          for(r=rc.line_count; r>0; r--){
            //delete the record
            if(structKeyExists(rc,'delete_' & r) && rc['delete_' & r] == 1){
              if(structKeyExists(rc,'docDetailId_' & r) &&
isNumeric(rc['docDetailId_' & r])){
                var detail = salesOrderDetailService.get(rc['docDetailId_' &
r]);
                rc.salesOrder.getSalesOrderDetails()
[r].setSalesOrder(javacast('null',''));
                rc.salesOrder.removeSalesOrderDetails(detail);
              }

            //edit the record
            }else if(structKeyExists(rc,'docDetailId_' & r) &&
isNumeric(rc['docDetailId_' & r])){
  
salesOrderDetailService.buildSalesOrderDetail(data=rc.salesOrder.getSalesOrderDetails()
[r], index=r, rc=rc);
  
rc.salesOrder.setSalesOrderDetails(rc.salesOrder.getSalesOrderDetails());

            //add the record
            }else{
              var detail = salesOrderDetailService.new();
              detail =
salesOrderDetailService.buildSalesOrderDetail(data=detail, index=r,
rc=rc);
              rc.salesOrder.addSalesOrderDetails(detail);
            }
          }
        }

        //validate and sanitize the incoming data
        errors = salesOrderService.validateSalesOrder(data=rc.salesOrder);
        //create object and populate the model first
        if(arrayLen(errors) == 0){
          rc.salesOrder =
salesOrderService.sanitizeSalesOrder(data=rc.salesOrder);
          //try to save
          if(salesOrderService.saveAll([rc.salesOrder])){
            messageBox.info("Your Sales Order was saved successfully.");
            setNextRoute('salesOrder');
          }else{
            messageBox.error("There was a problem with saving your sales
order. Please try again.");
          }
        }else{
          messageBox.setMessage(type="error", messageArray=errors);
        }
      }else{
        messageBox.error("Could not find a Sales Order with that ID.
Please try again.");
        setNextEvent('salesOrder');
      }
    }else{
      messageBox.error("There was not a valid ID provided. Please try
again.");
      setNextEvent('salesOrder');
    }
    //set view
    event.setView('salesOrder/edit');
  }

Error receiving:
Application Execution Exception
Error Type: Database : n/a
Error Messages: An exception occurred when committing the transaction.
The root cause of this exception was:
coldfusion.orm.hibernate.HibernateSessionException: [Macromedia]
[SQLServer JDBC Driver][SQLServer]Cannot insert the value NULL into
column 'Doc_Header_ID', table 'WITS.dbo.Tw_SO_Detail'; column does not
allow nulls. UPDATE fails..

I have wracked my brain for 24 hours and I need to move on. It's a
simple process of removing whatever association the user has selected
for remove from the view but something keeps trying to save it and
since the association has been removed from rc.salesOrder, the FK is
null but it is still included.

Please help and thanks so much in advance.

Actually, this post would be more appropriate for the cf-orm-dev
google group.

Thanks Jim, will try over there.