mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
docs: update one-to-one-relations.md (#9456)
One to one documentation is referring to the wrong entity
This commit is contained in:
parent
1194448fc5
commit
66acec8c0c
@ -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.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user