docs: update one-to-one-relations.md (#9456)

One to one documentation is referring to the wrong entity
This commit is contained in:
Warwick 2022-11-04 12:58:14 +02:00 committed by GitHub
parent 1194448fc5
commit 66acec8c0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,7 @@ export class User {
}
```
Here we added `@OneToOne` to the `profile` and specify the target relation type to be `Profile`.
Here we added `@OneToOne` to the `user` and specify the target relation type to be `Profile`.
We also added `@JoinColumn` which is required and must be set only on one side of the relation.
The side you set `@JoinColumn` on, that side's table will contain a "relation id" and foreign keys to target entity table.