Francois Gouget : testbot: Document a quirk of Collection::Add().
Alexandre Julliard
julliard at winehq.org
Thu Dec 7 12:09:39 CST 2017
Module: tools
Branch: master
Commit: 97036c17e646267916d87da7570a420631611d9a
URL: http://source.winehq.org/git/tools.git/?a=commit;h=97036c17e646267916d87da7570a420631611d9a
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Thu Dec 7 04:13:09 2017 +0100
testbot: Document a quirk of Collection::Add().
Not only does it not force loading from the database, it marks the
Collection as loaded. So if Add() is the first call on a Collection,
calling GetKeys() or GetItems() later on will only return the new
Item.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
testbot/lib/ObjectModel/Collection.pm | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/testbot/lib/ObjectModel/Collection.pm b/testbot/lib/ObjectModel/Collection.pm
index 9d3d3ae..1b29ec1 100644
--- a/testbot/lib/ObjectModel/Collection.pm
+++ b/testbot/lib/ObjectModel/Collection.pm
@@ -168,6 +168,11 @@ sub Load($)
Instantiates a new Item and adds it to the Collection.
+Note that not only does calling Add() not force loading from the database,
+it marks the Collection as loaded. So if Add() is the first call on a
+Collection, calling GetKeys() or GetItems() later on will only return the new
+Item.
+
See Item->new() for details on the Item's default column values and for
important information regarding its primary key.
More information about the wine-cvs
mailing list