
エントリーの編集

エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
TypeORMで1:1のリレーションの定義の仕方 - Qiita
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています

- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
TypeORMで1:1のリレーションの定義の仕方 - Qiita
import { Column, Entity, OneToOne, PrimaryGeneratedColumn } from 'typeorm'; import { EmployeeChil... import { Column, Entity, OneToOne, PrimaryGeneratedColumn } from 'typeorm'; import { EmployeeChild } from './employee-child.entity'; @Entity('employees') export class Employee { @PrimaryGeneratedColumn({ type: 'int', name: 'id' }) id: number; @Column('varchar', { name: 'name', length: 255 }) name: string; @OneToOne( () => EmployeeChild, (employeeChild) => employeeChild.employee, ) employeeChild: E