Doctrine 2 join table + extra fields

前端 未结 1 1254
北荒
北荒 2021-01-01 15:06

I\'ve got two tables and a join table: \'staff\', \'classification\' and \'staff_classification\'. In the join table I\'ve got an extra boolean field: \'showclassification\'

相关标签:
1条回答
  • 2021-01-01 15:51

    You want an entity that describes the relationship (StaffClassifications), which has OneToMany relationships with both staff and classifications.

    ManyToMany doesn't allow you have any "extra" properties, because the join table is not an entity, and thus can't have any properties.

    0 讨论(0)
提交回复
热议问题