docs: fixes and changes based on latest updates (#7322)
* docs: changes based on DX changes * remove fields no longer needed * remove unnecessary parameters * fixes to authenticate middleware usage * add highlight to migrations config * change configuration to http * added missing remote link docs * fix name in sidebar * added notification module docs + updated file module docs * add vale exceptions * fix vale errors * added docs on custom cli scripts
This commit is contained in:
+4
-5
@@ -6,14 +6,14 @@ export const metadata = {
|
||||
|
||||
In this document, you’ll learn how to implement database operations, such as creating a record, in the main service.
|
||||
|
||||
## Use Data Model Services
|
||||
## Use the Data Model's Generated Service
|
||||
|
||||
The module container has a generated service registered for each data model. You can resolve that service and use it to perform database operations on the data model.
|
||||
To perform database operations on a data model, use the model's generated service in the module's container.
|
||||
|
||||
For example:
|
||||
|
||||
export const highlights = [
|
||||
["13", "", "Inject myCustomService, which is the service generated by the container loader for the MyCustom data model."],
|
||||
["13", "", "Inject myCustomService, which is the generated service of the `MyCustom` data model."],
|
||||
["22", "", "Add a new field for the generated service of the MyCustom data model."],
|
||||
["29", "", "Set the class field to the injected dependency."],
|
||||
["35", "create", "Use the `create` method of the generated service."]
|
||||
@@ -55,8 +55,7 @@ class HelloModuleService extends ModulesSdkUtils
|
||||
data: CreateMyCustomDTO
|
||||
): Promise<MyCustomDTO> {
|
||||
const myCustom = await this.myCustomService_.create(
|
||||
data,
|
||||
context
|
||||
data
|
||||
)
|
||||
|
||||
return myCustom
|
||||
|
||||
Reference in New Issue
Block a user