https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38273
Bug ID: 38273
Summary: Koha::Object->discard_changes should return the
Koha::Object for chaining, not the Schema Object
Change sponsored?: ---
Product: Koha
Version: Main
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
Depends on: 17594
The dbic discard_changes method returns the current schema object ready for
chaining.. for some reason we didn't wrap it to return the current Koha object
when we do the same and as such we have to always call it in a distinct
statement and we lose chainability.
my $patron = Koha::Patron->new()->store()->discard_changes;
This returns a Koah::Schema::Result::Borrower object.. it should return the
fully updated from the database Koha::Patron object.
Instead, one has to do
my $patron = Koha::Patron->new()->store();
$patron->discard_changes;
This is confusing and inconsistent with the parent library.
Referenced Bugs:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17594
[Bug 17594] Make Koha::Object->discard_changes available
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/