| Summary: | Koha::Object does not save changes | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Srdjan Jankovic <srdjan> |
| Component: | Architecture, internals, and plumbing | Assignee: | Galen Charlton <gmcharlt> |
| Status: | CLOSED INVALID | QA Contact: | Testopia <testopia> |
| Severity: | enhancement | ||
| Priority: | P5 - low | CC: | jonathan.druart, julian.maurice, kyle, veron |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Crowdfunding committed: | 0 |
| Crowdfunding contact: | Patch complexity: | --- | |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
Srdjan, what did you try exactly?
I have tried the following:
use Modern::Perl;
use Koha::Borrowers;
my $p = Koha::Borrowers->find(10);
$p->set({firstname => 'my new firstname', surname => 'my new surname' })->store;
then
MariaDB [koha]> select firstname, surname from borrowers where borrowernumber=10;
And I got my updated values.
Well I cannot make it happen now myself. Who knows what was going on... |
$object->set({column => $val})->store does not work. DB trace: BEGIN WORK COMMIT On the other hand, $object->_result()->update({column => $val}) does work. DB trace: BEGIN WORK UPDATE borrowers SET overdrive_auth_token = ? WHERE ( borrowernumber = ? ): XXX, YYY COMMIT