row.remove() not deleting rows from the db table
404809Jun 15 2004 — edited Jun 16 2004I have two views in a master detail relationship. I am trying to delete a row in the master view and all the child rows in the detail view with the code below but it is not working. The rows do not get deleted from the database table they only "disappear" from the view.
I am not forgetting to commit.
SredstvaViewImpl viewS = getSredstvaView(); //master view
SredstvaViewRowImpl rowS = (SredstvaViewRowImpl)viewS.getCurrentRow(); // master row
RowIterator dijelovi = rowS.getDijeloviView(); // child row iterator
// delete master row
rowS.remove();
// delete first row in the child row iterator
if(dijelovi.first() != null)
{
dijelovi.first().remove();
}
// delete child rows
while(dijelovi.hasNext()){
dijelovi.next().remove();
}