問題タブ [bidirectional-relation]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
95 問題
0
投票する
0
に答える
3315
参照
postgresql - TypeORM 双方向複合主キー関係
1 つUser
は複数持つことができますProfiles
。にUser
のみを保存したいprofileId
。のProfile
IDを保存したいUser
。
ユーザー
プロフィール
簡単に言えば、2 つの外部キーを作成したいと考えています。からUser.profileId
へ、Profile.id
からProfile.userId
へUser.Id
。これは私の問題に対するベスト プラクティス ソリューションですか?