Skip to content

Commit

Permalink
docs: fix comment and add warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Agnes Lin authored and agnes512 committed Dec 30, 2019
1 parent f90f23e commit 680f823
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/site/HasMany-relation.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export class Customer extends Entity {
id: number;

// if you'd like to use this property as the source id
// of a certain relation that relates to a model `Foo`
// of a certain relation that relates to a model `Review`
@property({
type: 'number',
})
Expand Down Expand Up @@ -311,7 +311,7 @@ export class Review extends Entity {
}
```

{% include important.html content="LB4 doesn't support composite keys for now. e.g joining two tables with more than one source key. Related GitHub issue: [Composite primary/foreign keys](https://github.com/strongloop/loopback-next/issues/1830)" %}
{% include important.html content="It is user's responsibility to make sure the non-id source key doesn't have duplicate value. Besides, LB4 doesn't support composite keys for now. e.g joining two tables with more than one source key. Related GitHub issue: [Composite primary/foreign keys](https://github.com/strongloop/loopback-next/issues/1830)" %}

If you need to use _different names for models and database columns_, to use
`my_orders` as db column name other than `orders` for example, the following
Expand Down
4 changes: 2 additions & 2 deletions docs/site/hasOne-relation.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export class Supplier extends Entity {
id: number;

// if you'd like to use this property as the source id
// of a certain relation that relates to a model `Foo`
// of a certain relation that relates to a model `Manufacturer`
@property({
type: 'number',
})
Expand Down Expand Up @@ -247,7 +247,7 @@ export class Manufacturer extends Entity {
}
```

{% include important.html content="LB4 doesn't support composite keys for now. e.g joining two tables with more than one source key. Related GitHub issue: [Composite primary/foreign keys](https://github.com/strongloop/loopback-next/issues/1830)" %}
{% include important.html content="It is user's responsibility to make sure the non-id source key doesn't have duplicate value. Besides, LB4 doesn't support composite keys for now. e.g joining two tables with more than one source key. Related GitHub issue: [Composite primary/foreign keys](https://github.com/strongloop/loopback-next/issues/1830)" %}

If you need to use _different names for models and database columns_, to use
`suppAccount` as db column name instead of `account` for example, the following
Expand Down

0 comments on commit 680f823

Please sign in to comment.