Skip to content
This repository has been archived by the owner on Jun 29, 2021. It is now read-only.

[Request] Setting Collection Name and other Schema options via annotation and reflections #395

Closed
sverraest opened this issue Nov 15, 2019 · 0 comments

Comments

@sverraest
Copy link

sverraest commented Nov 15, 2019

Describe what you need | want

Is it possible to set the schema options on the document via reflection on the class annotation?
As this library already uses reflection this might be possible via class decorators, similar to how typeorm does this?

Do you have already an idea for the implementation?

@Schema({collectionName: "registration_flows"})
export class Flow {

    @prop()
    name: string

    @prop()
    key: string

    @prop()
    default: boolean;

    @prop()
    sections: Section[];
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant