getPureFromMainRelations
getPureFromRelatedRelations: (schemaName: string)
Example
const cities = coreApp.odm.newModel("city", locationPure, {
country: {
schemaName: "country",
type: "single",
optional: false,
relatedRelations: {
cities: {
type: "multiple",
limit: 5,
sort: {
field: "_id",
order: "asc",
},
},
},
},
});
const getCityPureFromMainRelations = coreApp.schemas.getPureFromMainRelations("city");
Return Of Example
{
"country": {
"type": "object",
"schema": {
"_id": {
"type": "union",
"schema": null
},
"name": {
"type": "string",
"schema": null
},
"population": {
"type": "number",
"schema": null
},
"abb": {
"type": "string",
"schema": null
}
}
}
}
Parameters
schemaName: string