I'm a little less certain about exactly how these getters and setters will interact with all the various field types [Tecnically].
This patch adds a 'getter' and 'setter' attribute to all fields, which takes a string of a method to call when a field is retrieved or set.
This defines a getter returns a filtered value from the DB, a setter processes the value to add "_setter" to it in all cases, and on has_both we see a setter than implements the use case of updating another field when a property is set.
Example: We set the cam.model value as "TVM4" in the database and, when we intended to get the value from the database it will return as "TVM4"as well.A getter receives as its argument the current "real" value (the one that either came from the database, object construction, or a prior setting of the value), and what the getter returns is actually what the user gets back from the attribute.Please guide,me,hoe the setter and getters integrated with database with an Example.
A setter receives as its argument the value that the user is setting the property to, and what it returns is what the property will actually be set to.
Getters and setters do not operate during the creation of the object, but by retrieval from the database or creation by instantiating the class; Please advise.
These sentences,I am not very sure,It was right or wrong,do I am asking your suggesstions sir?
Getters and setters do not operate during the creation of the object, but by retrieval from the database or creation by instantiating the class;
1.I like to know,how setter and getter integrated with database,Technically,how the are integrated the data as per requested.
I know that mainly,we something as "ABC",and ask the machine to the value of the "ABC",that we already ,defaultly.
2.At here,I like to know,techically,how it work sir.