Skip to content
Snippets Groups Projects
Commit e53aeabe authored by Alessandro Vullo's avatar Alessandro Vullo
Browse files

[ENSCORESW-1716]. Query is built considering presence of null values.

parent 92328560
No related branches found
No related tags found
No related merge requests found
......@@ -578,9 +578,16 @@ sub store {
version
);
my $created = $self->db->dbc->from_seconds_to_date($operon->created_date());
my $modified = $self->db->dbc->from_seconds_to_date($operon->modified_date());
push @canned_columns, 'created_date', 'modified_date';
push @canned_values, $created, $modified;
my $modified = $self->db->dbc->from_seconds_to_date($operon->modified_date());
if ($created) {
push @canned_columns, 'created_date';
push @canned_values, $created;
}
if ($modified) {
push @canned_columns, 'modified_date';
push @canned_values, $modified;
}
}
my $i_columns = join(', ', @columns, @canned_columns);
......
......@@ -632,9 +632,16 @@ sub store {
version
);
my $created = $self->db->dbc->from_seconds_to_date($operon_transcript->created_date());
my $modified = $self->db->dbc->from_seconds_to_date($operon_transcript->modified_date());
push @canned_columns, 'created_date', 'modified_date';
push @canned_values, $created, $modified;
my $modified = $self->db->dbc->from_seconds_to_date($operon_transcript->modified_date());
if ($created) {
push @canned_columns, 'created_date';
push @canned_values, $created;
}
if ($modified) {
push @canned_columns, 'modified_date';
push @canned_values, $modified;
}
}
my $i_columns = join(', ', @columns, @canned_columns);
my $i_values = join(', ', (('?') x scalar(@columns)), @canned_values);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment