Bug 22622 - Add Koha::Object method _new_from_hashref
Summary: Add Koha::Object method _new_from_hashref
Status: Patch doesn't apply
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-02 11:29 UTC by Kyle M Hall
Modified: 2022-04-22 22:03 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 22622: Add Koha::Object method _new_from_hashref (2.15 KB, patch)
2019-04-02 11:30 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 22622: Add Koha::Object method _new_from_hashref (2.16 KB, patch)
2020-03-09 13:07 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2019-04-02 11:29:37 UTC
It may be useful to be able to instantiate a Koha::Object from data already fetched from the database. This might be used for compatibility with legacy code, or perhaps for use with optimized queries.
Comment 1 Kyle M Hall 2019-04-02 11:30:51 UTC
Created attachment 87317 [details] [review]
Bug 22622: Add Koha::Object method _new_from_hashref

It may be useful to be able to instantiate a Koha::Object from data already fetched from the database. This might be used for compatibility with legacy code, or perhaps for use with optimized queries.
Comment 2 Bernardo Gonzalez Kriegel 2020-03-05 23:33:59 UTC
Does not apply, seems easy to fix.
Comment 3 Kyle M Hall 2020-03-09 13:07:46 UTC
Created attachment 100370 [details] [review]
Bug 22622: Add Koha::Object method _new_from_hashref

It may be useful to be able to instantiate a Koha::Object from data already fetched from the database. This might be used for compatibility with legacy code, or perhaps for use with optimized queries.
Comment 4 Fridolin Somers 2020-09-29 13:11:18 UTC
With object coming from _new_from_hashref(), sure that in_storage() is true ?

Maybe add it to unit test.
Comment 5 Lucas Gass 2022-04-22 22:03:01 UTC
It looks like your unit tests no longer cleanly apply.