[Koha-bugs] [Bug 20621] Add ability for Koha::Object objects to update themselves with database generated value automatically

2023-01-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20621

Kyle M Hall  changed:

   What|Removed |Added

 Resolution|--- |WONTFIX
 Status|Needs Signoff   |RESOLVED

--- Comment #6 from Kyle M Hall  ---
(In reply to Victor Grousset/tuxayo from comment #5)
> "Needs Signoff" => what is needed to do for signoff?
> 
> I guess for QA we need an automated test, right? So it's needed and having
> it run as a signoff would be enough.

This is so old it still checks wantarray. I do not believe it is worth pursuing
at this time.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 20621] Add ability for Koha::Object objects to update themselves with database generated value automatically

2023-01-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20621

Victor Grousset/tuxayo  changed:

   What|Removed |Added

 CC||vic...@tuxayo.net

--- Comment #5 from Victor Grousset/tuxayo  ---
"Needs Signoff" => what is needed to do for signoff?

I guess for QA we need an automated test, right? So it's needed and having it
run as a signoff would be enough.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 20621] Add ability for Koha::Object objects to update themselves with database generated value automatically

2021-02-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20621

Lari Taskula  changed:

   What|Removed |Added

   See Also||https://bugs.koha-community
   ||.org/bugzilla3/show_bug.cgi
   ||?id=27630

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 20621] Add ability for Koha::Object objects to update themselves with database generated value automatically

2020-10-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20621

--- Comment #4 from Kyle M Hall  ---
(In reply to Fridolin SOMERS from comment #3)
> 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.

My understanding is that get_from_storage has more overhead than
discard_changes, though they have the same end result. get_from_storage creates
and entirely new object, where discard_changes simply updates the existing
object.

https://metacpan.org/pod/DBIx::Class::Row#get_from_storage

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 20621] Add ability for Koha::Object objects to update themselves with database generated value automatically

2020-09-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20621

Fridolin SOMERS  changed:

   What|Removed |Added

 CC||fridolin.som...@biblibre.co
   ||m

--- Comment #3 from Fridolin SOMERS  ---
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.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 20621] Add ability for Koha::Object objects to update themselves with database generated value automatically

2020-09-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20621

Martin Renvoize  changed:

   What|Removed |Added

 CC||martin.renvoize@ptfs-europe
   ||.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 20621] Add ability for Koha::Object objects to update themselves with database generated value automatically

2019-06-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20621

Martin Renvoize  changed:

   What|Removed |Added

   See Also||https://bugs.koha-community
   ||.org/bugzilla3/show_bug.cgi
   ||?id=22741

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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/


[Koha-bugs] [Bug 20621] Add ability for Koha::Object objects to update themselves with database generated value automatically

2018-04-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20621

Kyle M Hall  changed:

   What|Removed |Added

 Status|NEW |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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/


[Koha-bugs] [Bug 20621] Add ability for Koha::Object objects to update themselves with database generated value automatically

2018-04-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20621

--- Comment #2 from Kyle M Hall  ---
Created attachment 74555
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=74555=edit
Bug 20621: Add ability for Koha::Object objects to update themselves with
database generated value automatically

Koha objects should, on store() update themselves from the db if the database
creates any of the columns. That way we don't have to call discard_changes()
manually.

See
https://wiki.koha-community.org/wiki/Koha_Objects#store_doesn.27t_return_the_DB_object
for details.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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/


[Koha-bugs] [Bug 20621] Add ability for Koha::Object objects to update themselves with database generated value automatically

2018-04-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20621

Kyle M Hall  changed:

   What|Removed |Added

   Assignee|koha-b...@lists.koha-commun |k...@bywatersolutions.com
   |ity.org |

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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/


[Koha-bugs] [Bug 20621] Add ability for Koha::Object objects to update themselves with database generated value automatically

2018-04-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20621

--- Comment #1 from Kyle M Hall  ---
See
https://wiki.koha-community.org/wiki/Koha_Objects#store_doesn.27t_return_the_DB_object
for details.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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/