問題タブ [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.

0 投票する
0 に答える
3315 参照

postgresql - TypeORM 双方向複合主キー関係

1 つUserは複数持つことができますProfiles。にUserのみを保存したいprofileId。のProfileIDを保存したいUser

ユーザー

プロフィール

簡単に言えば、2 つの外部キーを作成したいと考えています。からUser.profileIdへ、Profile.idからProfile.userIdUser.Id。これは私の問題に対するベスト プラクティス ソリューションですか?