[tools] testbot/orm: Don't assume that key columns don't need conversion.
Francois Gouget
fgouget at codeweavers.com
Tue May 31 12:15:49 CDT 2022
This allows using booleans and timestamps in the key columns.
It also makes GetUpdateData() consistent with GetInsertData().
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
testbot/lib/ObjectModel/DBIBackEnd.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/testbot/lib/ObjectModel/DBIBackEnd.pm b/testbot/lib/ObjectModel/DBIBackEnd.pm
index 94e4be6b7..940d37f65 100644
--- a/testbot/lib/ObjectModel/DBIBackEnd.pm
+++ b/testbot/lib/ObjectModel/DBIBackEnd.pm
@@ -619,7 +619,7 @@ sub GetUpdateData($$$)
{
foreach my $ColName (@{$PropertyDescriptor->GetColNames()})
{
- push @Data, $Item->GetColValue($ColName);
+ push @Data, $self->ToDb($Item->GetColValue($ColName), $PropertyDescriptor);
}
}
}
@@ -663,6 +663,7 @@ sub SaveCollection($$)
die "Sequence property spans multiple columns";
}
+ # No FromDb() conversion needed for integers
$Item->PutColValue(@{$ColNames}[0], $Db->{'mysql_insertid'});
$Collection->KeyChanged($Key, $Item->GetKey());
}
--
2.30.2
More information about the wine-devel
mailing list