bbbeasy
bbbeasy copied to clipboard
Fix models integrity by using the "id" instead of "name" when dealing with models
Describe the bug Labels, rooms and presets are bing loaded by their names instead of their id. The should be the only and unique identifier when loading and saving those three models.
To Reproduce Steps to reproduce the behavior: search PHP function with "byName".
Expected behavior When dealing with records we should use the "id" column as identifier.
Possible solution Refactor the code to use "id" and not any other column.
Additional context It creates additional bugs related to the session.
https://github.com/riadvice/bbbeasy/pull/915#issuecomment-1719062286
https://github.com/riadvice/bbbeasy/pull/915#issuecomment-1719207602