Model Module is responsible for handling of CRUD operations of documents in the backend.
In addition, it handles the operations associated with documents such as tagging documents & assign users to documents.
Things to know
It is recommended for better support of types by code assistance in IDEs to usegetFrappeModelController()in order to get the instance of FrappeModelController instead of renovation.model which is ModelController if the backend is Frappè, for instance. In this guide we will use Frappé as an example and use getFrappeModelController()
Most of the methods in this controller return and/or have arguments of type T. This means that the object returned or passed is of a class type that extends a class that extends RenovationDocument, for instance, FrappeDocument .
To get a single document using its type and name (identifier).
The doctype of the document, e.g: 'Renovation Review'
The name (identifier) of the document, e.g: 'RE-00021'
Fetch the data from the server even if there is cached data