I am a bit confused as to how the model should "work" in my basic C ++ implementation, and more specifically, how the data from the database should be encapsulated / processed.
My thoughts at the moment relate to the model, for example, to the static method findById (), which will return an instance of the same model, which then will be a single "row" of data (allowing manipulation, etc.) to be a suitable approach.
In terms of creating a new row in the database, I assume that a new instance of the model will be created, filled with data, and the save () method, which is called?
Hope I'm on the right track, but I'm a bit confused about implementation / design.
Any advice is appreciated.
Thanks in advance James
James stephenson
source
share