Skip to content

Commit

Permalink
feat: study model to be one to many association
Browse files Browse the repository at this point in the history
  • Loading branch information
Chinlinlee committed Aug 4, 2023
1 parent a851781 commit bf117fe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions models/sql/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ async function init() {
StudyModel.belongsTo(PersonNameModel, {
foreignKey: "x00080090"
});

StudyModel.hasMany(SeriesModel, {
foreignKey: "x0020000D",
sourceKey: "x0020000D"
});
SeriesModel.belongsTo(StudyModel, {
foreignKey: "x0020000D",
targetKey: "x0020000D"
Expand Down

0 comments on commit bf117fe

Please sign in to comment.