This uncomments a call to _delete_empty_auto_increment. True to its name,
this function removes NULL auto-increments from the column info so that
they are not INSERTed. The call to this method was commented out in
93ad3243, but I cannot find anyone who remembers why, and re-enabling the
call does not break any other tests on postgres, mysql, or sqlite.
However, this change alone does not cause the test to pass; there are still
issues with databases which enforce foreign constraints (tested on
postgres, mysql, and sqlite with the foreign_keys pragma). I'm not sure if
the test itself is broken, but maybe it should at least be marked as TODO.
$if_not_submitted );
}
- # $self->_delete_empty_auto_increment($object);
+ _delete_empty_auto_increment($object);
# don't allow insert to recurse to related objects
# do the recursion ourselves
# $object->{_rel_in_storage} = 1;
}
sub _delete_empty_auto_increment {
- my ( $self, $object ) = @_;
+ my ( $object ) = @_;
for my $col ( keys %{ $object->{_column_data} } ) {
if ($object->result_source->column_info($col)->{is_auto_increment}
and ( !defined $object->{_column_data}{$col}