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

[BUG]: ORM cloneResult uses Setters if property is private #16454

Open
rudiservo opened this issue Oct 17, 2023 · 0 comments
Open

[BUG]: ORM cloneResult uses Setters if property is private #16454

rudiservo opened this issue Oct 17, 2023 · 0 comments
Labels
bug A bug report status: unverified Unverified

Comments

@rudiservo
Copy link
Contributor

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
@rudiservo rudiservo added bug A bug report status: unverified Unverified labels Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug report status: unverified Unverified
Projects
None yet
Development

No branches or pull requests

1 participant