Skip to content

Commit

Permalink
docs: update connection-options.md (#5902)
Browse files Browse the repository at this point in the history
The "entitySchemas" connection option doesn't work. Instead, schemas are recognized when added to the "entities" connection option. The docs were updated to reflect that.
  • Loading branch information
tareqdayya committed May 16, 2020
1 parent 665b83c commit 90d31a0
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions docs/connection-options.md
Expand Up @@ -34,24 +34,19 @@ If connection name is not given then it will be called "default".
* `extra` - Extra connection options to be passed to the underlying driver.
Use it if you want to pass extra settings to underlying database driver.

* `entities` - Entities to be loaded and used for this connection.
Accepts both entity classes and directories paths to load from.
* `entities` - Entities, or Entity Schemas, to be loaded and used for this connection.
Accepts both entity classes, entity schema classes, and directories paths to load from.
Directories support glob patterns.
Example: `entities: [Post, Category, "entity/*.js", "modules/**/entity/*.js"]`.
Learn more about [Entities](./entities.md).
Learn more about [Entities](./entities.md).
Learn more about [Entity Schemas](separating-entity-definition.md).

* `subscribers` - Subscribers to be loaded and used for this connection.
Accepts both entity classes and directories to load from.
Directories support glob patterns.
Example: `subscribers: [PostSubscriber, AppSubscriber, "subscriber/*.js", "modules/**/subscriber/*.js"]`.
Learn more about [Subscribers](listeners-and-subscribers.md).

* `entitySchemas` - Entity schemas to be loaded and used for this connection.
Accepts both entity schema classes and directories to load from.
Directories support glob patterns.
Example: `entitySchemas: [PostSchema, CategorySchema, "entity-schema/*.json", "modules/**/entity-schema/*.json"]`.
Learn more about [Entity Schemas](separating-entity-definition.md).

* `migrations` - Migrations to be loaded and used for this connection.
Accepts both migration classes and directories to load from.
Directories support glob patterns.
Expand Down

0 comments on commit 90d31a0

Please sign in to comment.