//main tables
//(foreignKey contains field name in association table)
subject.hasOne(teacher_subject_allocation , { foreignKey: 'subject_id' });
teacher.hasOne(teacher_subject_allocation , { foreignKey: 'teacher_id' });
section.hasOne(teacher_subject_allocation , { foreignKey: 'section_id' });
//association table
//(targetKey is PK of main table, foreignKey is field of current table)
teacher_subject_allocation.belongsTo(subject, { targetKey: 'id', foreignKey: 'subject_id' });
teacher_subject_allocation.belongsTo(teacher, { targetKey: 'id', foreignKey: 'teacher_id' });
teacher_subject_allocation.belongsTo(section, { targetKey: 'id', foreignKey: 'section_id' });
あなたはなし個人属性とはどういう意味ですか? – Shaharyar
自身の属性はありません –