Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider to change the return value when Eloquent model is updated #10487

Open
Vitaliy-1 opened this issue Oct 1, 2024 · 0 comments
Open

Consider to change the return value when Eloquent model is updated #10487

Vitaliy-1 opened this issue Oct 1, 2024 · 0 comments
Assignees
Labels
Housekeeping:1:Todo Any dependency management or refactor that would be nice to have some day.
Milestone

Comments

@Vitaliy-1
Copy link
Collaborator

Describe the bug
Originally, when eloquent model is updated, the method returns the number of updated rows from the primary table. E.g.,

Announcement::where('type_id', '=', '1')->update([
  'title' => 'Announcement Title'
  'type_id' => '2'
])

After refactoring, Models that are utilising settings table, will return the number of updated rows from the primary table and settings table.

  1. Explore if this has any drawbacks.
  2. Consider alternative option, return associative array with the number of updated rows from primary and settings table (pkp/pkp-lib#10328 Refactor Announcements #10382 (comment))

What application are you using?
OJS main branch

@Vitaliy-1 Vitaliy-1 added the Housekeeping:1:Todo Any dependency management or refactor that would be nice to have some day. label Oct 1, 2024
@Vitaliy-1 Vitaliy-1 added this to the 3.5.0 LTS milestone Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Housekeeping:1:Todo Any dependency management or refactor that would be nice to have some day.
Projects
None yet
Development

No branches or pull requests

2 participants