From 84fe2a383773211807f7006bfdd7d9c68be78b8b Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Wed, 2 Aug 2023 10:45:04 +0300 Subject: [PATCH] docs: add missing code in create entity doc (#4669) --- docs/content/development/entities/create.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/content/development/entities/create.mdx b/docs/content/development/entities/create.mdx index 00c47b7103..9016a34e13 100644 --- a/docs/content/development/entities/create.mdx +++ b/docs/content/development/entities/create.mdx @@ -71,6 +71,7 @@ import { BeforeInsert, Column, Entity, + JoinColumn, ManyToOne, } from "typeorm" import { BaseEntity } from "@medusajs/medusa" @@ -86,6 +87,7 @@ export class Post extends BaseEntity { author_id: string @ManyToOne(() => Author, (author) => author.posts) + @JoinColumn({ name: "author_id" }) author: Author @BeforeInsert()