[Bug 45023] TestBot Object Relational Mapper issues
wine-bugs at winehq.org
wine-bugs at winehq.org
Sat Apr 21 13:16:04 CDT 2018
https://bugs.winehq.org/show_bug.cgi?id=45023
--- Comment #2 from François Gouget <fgouget at codeweavers.com> ---
Yet another issue.
15. New items must be saved through the collection
It's possible to call an item's Save() method to save it to the database after
modifying it. So the following code works:
my $Job = CreateJobs()->GetItem(1234);
$Job->Status("queued");
...
$Job->Save();
But it's not possible to do the same thing on a new item. So the following does
not work:
my $Job = CreateJobs()->Add();
$Job->Status("queued");
...
$Job->Save();
Instead one must do:
my $Jobs = CreateJobs();
my $Job = $Jobs->Add();
$Job->Status("queued");
...
$Jobs->Save(); # Save **every new and modified item** in the collection
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list