[Koha-bugs] [Bug 20621] Add ability for Koha::Object objects to update themselves with database generated value automatically
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Sep 25 11:49:13 CEST 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20621
Fridolin SOMERS <fridolin.somers at biblibre.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fridolin.somers at biblibre.co
| |m
--- Comment #3 from Fridolin SOMERS <fridolin.somers at biblibre.com> ---
Ahhh ok that is why in unit tests we see for example in
t/db_dependent/Members.t :
$borrowernumber = Koha::Patron->new( \%data )->store->borrowernumber;
my $patron = Koha::Patrons->find( $borrowernumber );
discard_changes() has a disturbing name i feel.
Should it use get_from_storage ?
my $patron = Koha::Patron->new( \%data )->store->get_from_storage;
In my opinion store() should update the object, that is a common behavior in
any ORM i think.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list