docs: add missing code in create entity doc (#4669)

This commit is contained in:
Shahed Nasser
2023-08-02 10:45:04 +03:00
committed by GitHub
parent 82ceea7000
commit 84fe2a3837

View File

@@ -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()