Bug 22622

Summary: Add Koha::Object method _new_from_hashref
Product: Koha Reporter: Kyle M Hall <kyle>
Component: Architecture, internals, and plumbingAssignee: Kyle M Hall <kyle>
Status: Patch doesn't apply --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: bgkriegel, fridolin.somers, lucas
Version: unspecified   
Hardware: All   
OS: All   
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
Bug 22622: Add Koha::Object method _new_from_hashref

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.