You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When the ORM hydrates an object, if a model property is private it will try and use a setter.
To Reproduce
Steps to reproduce the behavior:
have a setter and put a property in private
Expected behavior
Hydration should not use the setters it should hydrate the model with the values from the database, setters have a different usage, they are not for hydration.
Solution would be to have a funtion like assign but only for hydration and normalize how this is done all over the model.
Details
Phalcon version: 5
PHP Version: 8.1
Operating System: Ubuntu 22.04
Installation type: Compiling from source
Zephir version (if any): latest
Server: Nginx
Other related info (Database, table schema): Mysql
The text was updated successfully, but these errors were encountered:
Describe the bug
When the ORM hydrates an object, if a model property is private it will try and use a setter.
To Reproduce
Steps to reproduce the behavior:
have a setter and put a property in private
Expected behavior
Hydration should not use the setters it should hydrate the model with the values from the database, setters have a different usage, they are not for hydration.
Solution would be to have a funtion like assign but only for hydration and normalize how this is done all over the model.
Details
The text was updated successfully, but these errors were encountered: