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

[NFR]: Small refactoring of Model #16391

Closed
rudiservo opened this issue Aug 4, 2023 · 1 comment
Closed

[NFR]: Small refactoring of Model #16391

rudiservo opened this issue Aug 4, 2023 · 1 comment
Labels
5.0 The issues we want to solve in the 5.0 release new feature request Planned Feature or New Feature Request

Comments

@rudiservo
Copy link
Contributor

rudiservo commented Aug 4, 2023

Model::postSaveRelatedRecords has a lot of many-to-many complex logic mixed with normal to-many , making a clear separation of both will be easier to debug and make less checks during execution.
Model messages can be wrapped into a function that will clear up some code and add functionality.
Model::doLowUpdate could benefit a better seperation of DynamicUpdate from regular update all fields.

doLowUpdate probably does not need to add this portion in the dynamic update, if the field isn't set, no change has happened.

                        let fields[]    = field,
                            values[]    = null,
                            bindTypes[] = bindSkip;
                    }

Better Error reporting in models by adding model name and/or referenceModel to exception

Better Message reporting in models by adding model name and/or referenceModel to Message::MetaData

@rudiservo rudiservo added the new feature request Planned Feature or New Feature Request label Aug 4, 2023
@rudiservo rudiservo changed the title [NFR]: Small refactoring of Model, added functions to Loader and MetaData [NFR]: Small refactoring of Model Aug 6, 2023
rudiservo added a commit to rudiservo/cphalcon that referenced this issue Aug 6, 2023
@niden niden added this to Phalcon v5 Aug 10, 2023
@niden niden moved this to Implemented in Phalcon v5 Aug 10, 2023
@niden niden added the 5.0 The issues we want to solve in the 5.0 release label Aug 10, 2023
@niden
Copy link
Member

niden commented Aug 10, 2023

Thank you @rudiservo

@niden niden moved this from Implemented to Released in Phalcon v5 Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.0 The issues we want to solve in the 5.0 release new feature request Planned Feature or New Feature Request
Projects
Status: Released
Development

No branches or pull requests

2 participants