From e615258ede1cdd6a13604b51524839b1bf229b49 Mon Sep 17 00:00:00 2001 From: laway Date: Thu, 31 Oct 2024 18:16:40 +0800 Subject: [PATCH] Bug fix, variable reference error --- docs/zh-CN/api/database/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh-CN/api/database/index.md b/docs/zh-CN/api/database/index.md index 46ada6c00..8166954ed 100644 --- a/docs/zh-CN/api/database/index.md +++ b/docs/zh-CN/api/database/index.md @@ -540,7 +540,7 @@ const AuthorsRepo = db.getRepository('authors'); const author1 = AuthorsRepo.create({ name: 'author1' }); const PostsRepo = db.getRepository('authors.posts', author1.id); -const post1 = AuthorsRepo.create({ title: 'post1' }); +const post1 = PostsRepo.create({ title: 'post1' }); asset(post1.authorId === author1.id); // true ```