开发教程API 文档常见问题Version: 6.4Methods
Parameters
Returns MergeSelected<Entity, Naked, keyof Data & string>
- getSchema(): undefined | string
Returns undefined | string
- init(options?: FindOneOptions<Entity, Hint, Fields, Exclude>): Promise<null | Loaded<Entity, Hint, Fields, Exclude>>
Parameters
Returns Promise<null | Loaded<Entity, Hint, Fields, Exclude>>
Parameters
populate: false | AutoPath<Entity, Hint, never, 9>[]
Returns Promise<Loaded<Entity, Hint, *, never>>
- populated(populated?: boolean): void
Parameters
optionalpopulated: boolean
Returns void
- setSchema(schema?: string): void
- setSerializationContext(options: LoadHint<Entity, Hint, Fields, Exclude>): void
Parameters
options: LoadHint<Entity, Hint, Fields, Exclude>
Returns void
- toJSON(...args: any[]): EntityDTO<Entity, never>
- toObject(): EntityDTO<Entity, never>
- toObject(ignoreFields: never[]): EntityDTO<Entity, never>
- toObject(ignoreFields: Ignored[]): Omit<EntityDTO<Entity, never>, Ignored>