Hello,
I'm trying to use Query::update_recordset, but I think I found a bug
Here is a sample job that I created.
If you run that in debug mode, you will see that the method InventTable.Update is always called, even if SkipDataMethods, Events and DatabaseLog are passed as TRUE. The execution revert to a 1 by 1 update operation, thus becoming really slow
If I use the update_recordset (not the class) the update method is not called and the execution is fast
Maybe this is a bug in the class?
internal final class TestUpdateRecordSet
{
/// <summary>
/// Class entry point. The system will call this method when a designated menu
/// is selected or when execution starts and this class is set as the startup class.
/// </summary>
/// <param name = "_args">The specified arguments.</param>
public static void main(Args _args)
{
Query q = new Query();
QueryBuildDataSource qbds = q.addDataSource(tableNum(InventTable));
qbds.addRange(fieldNum(InventTable, ItemId)).value("020061253001");
Map fieldMap = new Map(Types::String, Types::String);
fieldMap.insert(fieldStr(InventTable, NetWeight), any2Str("105"));
Query::update_recordset(fieldMap, q, true, true, true);
}
}