Francois Gouget : testbot/orm: Don't assume that key columns don't need conversion.

Alexandre Julliard julliard at winehq.org
Tue May 31 15:48:23 CDT 2022


Module: tools
Branch: master
Commit: 1bbff054090a6b3824d6f9ef9fe62be98f0b31fe
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=1bbff054090a6b3824d6f9ef9fe62be98f0b31fe

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Tue May 31 19:15:49 2022 +0200

testbot/orm: Don't assume that key columns don't need conversion.

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>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 94e4be6..940d37f 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());
         }




More information about the wine-cvs mailing list