user1070125
user1070125

Reputation: 353

Doctrine relations with intermediate table

I have a Product and Category entity that works and looks like this: doctrine2: in a one-to-many bidirectional relationship, how to save from the inverse side?

However in reality I have three tables:

product:

id | ...

category:

id | ...

productcategory:

product_id | category_id

How do I change my two entities to use an intermediate table? Or should I create a third entity?

Upvotes: 1

Views: 1695

Answers (0)

Related Questions