Per essere ulteriormente più chiaro vi scrivo le due casistiche che devo gestire.

codice:
-- CASO 1
    Righe presenti sul db:                Righe del dettaglio mappa:
      Quantità 1                            Quantità 1
      Quantità 2                               
      Quantità 3                            Quantità 3

-- CASO 2
    Righe presenti sul db:                Righe del dettaglio mappa:
      Quantità 1                            Quantità 1
      Quantità 2                            Quantità 2   
      Quantità 3
Nel CASO 1 devo cancellare Quantità 2 (e questo funziona con il codice di sopra); nel secondo caso invece no.
Devo essere nelle condizioni di gestire entrambe le casistiche.