Page Contents

The models involved in the relation must also exist before running this generator.

Synopsis

Creates a new model relation in a LoopBack application.

lb relation [options]

With API Connect developer toolkit:

apic loopback:relation [options]

With legacy StrongLoop tools:

$ slc relation [options]

Options

-h, --help
ツールのオプションと使い方を表示します。
--skip-cache
質問の回答を記憶しません。既定値は false です。
--skip-install
依存関係を自動的にインストールしません。既定値は false です。

Interactive Prompts

The tool will prompt you for:

  • Custom foreign key (optional)
  • Whether a “through” model is required.  Repy “Y” to create a HasManyThrough relations
  • Name of the “through” model, if appropriate.

Output

Updates the Model definition JSON files for the models involved in the relation.