getPureModelByNameAndKey
getPureModelByNameAndKey: (name: string, key: string)
Get pure one feature of one schema by name of schema and key of feature
Example
const coreApp = lesan();
const locationPure = {
name: string(),
population: number(),
abb: string(),
};
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 getCityPureModelByNameAndKey = coreApp.schemas.getPureModelByNameAndKey("city","abb");
Return Of Example
{
"type": "string",
"schema": null
}
Parameters
name: string,
key: string