From 66acec8c0c4cfadad2be3d6fc3bd3a468f0898d8 Mon Sep 17 00:00:00 2001 From: Warwick <45207010+WNortier@users.noreply.github.com> Date: Fri, 4 Nov 2022 12:58:14 +0200 Subject: [PATCH] docs: update one-to-one-relations.md (#9456) One to one documentation is referring to the wrong entity --- docs/one-to-one-relations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/one-to-one-relations.md b/docs/one-to-one-relations.md index b4f2937f9..d344e8415 100644 --- a/docs/one-to-one-relations.md +++ b/docs/one-to-one-relations.md @@ -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.