question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Global schema options

See original GitHub issue

It would be nice to be able to return schema options that will be applied to all models from the .forRoot call.

For example, If I want timestamps on all of my models I have to pass {timestamps: true} to all of my models. It would be nice If i could just return something like this from .forRoot Options and spread it into each model when calling .forFeature

{
  uri: "myUri",
  schemaOptions: {
    timestamps: true
  }
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
hasezoeycommented, Oct 22, 2019

global options are added in 6.1.0-6

@kpfromer this can be closed, when you want to

1reaction
hasezoeycommented, Oct 17, 2019

do you use typegoose with nest?

no, i did not use nest & type-graphql yet, but it is a planned feature

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mongoose v6.8.1: Schemas
Schemas have a few configurable options which can be passed to the constructor or to the set method: new Schema({..}, options); // or...
Read more >
Mongoose: How to make the global schema settings working ...
This document introduces a way to register global schema settings by registering global plugins, but it does not mention the situation when ...
Read more >
Global Schema - HULFT
Global Schema can be uniformly managed with "Global Schema settings" in the control panel. In "Global Schema settings", youb can view, delete, and...
Read more >
Settings - Shopify.dev
The settings_schema.json file controls the content of the Theme settings area of the theme editor. Settings in this file translate to global theme...
Read more >
Global Schema | r e a l - p r o g r a m m e r - WordPress.com
A local schema is a schema for a single document. Every document can have its own schema. It is possible that several documents...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found