Looking at line 3221:
my $index = $tp->find_best_index($tbl, $args{index}); die "Cannot find an ascendable index in table" unless $index;
if ( $index && $tbl->{keys}->{$index}->{is_unique}) { @del_cols = @{$tbl->{keys}->{$index}->{cols}}; } else { @del_cols = @{$tbl->{cols}}; } PTDEBUG && _d('Columns needed for DELETE:', join(', ', @del_cols));
I think the solution will be that if the index is no unique, use the primary key if exists as the deletion columns
Looking at line 3221:
my $index = $tp->find_ best_index( $tbl, $args{index});
die "Cannot find an ascendable index in table" unless $index;
if ( $index && $tbl->{ keys}-> {$index} ->{is_unique} ) { >{keys} ->{$index} ->{cols} };
@del_cols = @{$tbl-
}
else {
@del_cols = @{$tbl->{cols}};
}
PTDEBUG && _d('Columns needed for DELETE:', join(', ', @del_cols));
I think the solution will be that if the index is no unique, use the primary key if exists as the deletion columns