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
For generated models, the use of getter and setter functions actually makes the code hard to read, and further costs additional performance time versus straight field setting on transaction focused systems.
Therefore to reduce code complexity, make it easier to read, avoid the use of the call stack to set a single value, I now make use of public variables on model/entity objects;. I reserve the use of getter/setter when actual logic must be implemented on a specific field.
Therefore, I would like two new configuration options. One, a simple flag to generate models with public variables instead of getter/setter. A second which contains a list of object + field where I want to force the generation of the getter/setter.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
For generated models, the use of getter and setter functions actually makes the code hard to read, and further costs additional performance time versus straight field setting on transaction focused systems.
Therefore to reduce code complexity, make it easier to read, avoid the use of the call stack to set a single value, I now make use of public variables on model/entity objects;. I reserve the use of getter/setter when actual logic must be implemented on a specific field.
Therefore, I would like two new configuration options. One, a simple flag to generate models with public variables instead of getter/setter. A second which contains a list of object + field where I want to force the generation of the getter/setter.
Beta Was this translation helpful? Give feedback.
All reactions