Change cache strategy for User.t. Fix setRow in SQL.pm to accept overrides in row identifiers.

This commit is contained in:
Colin Kuskie 2010-05-06 15:50:43 -07:00
parent 1c4ea8eacd
commit 7032e86cf1
3 changed files with 9 additions and 8 deletions

View file

@ -962,9 +962,8 @@ Use this ID to create a new row. Same as setting the key value to "new" except t
sub setRow {
my ($self, $table, $keyColumn, $data, $id) = @_;
$data->{$keyColumn} ||= $id;
if ($data->{$keyColumn} eq "new") {
$data->{$keyColumn} = $self->session->id->generate();
if ($data->{$keyColumn} eq "new" || $id) {
$data->{$keyColumn} = $id || $self->session->id->generate();
}
my $dbh = $self->dbh;
my @fields = ();