Top "Many-to-many" questions

A type of relationship between entities of types A and B which associates a list of entities of type B to an entity of type A and vice versa.

What is the difference between fetch="EAGER" and fetch="LAZY" in doctrine

What is the difference between fetch="EAGER" and fetch="LAZY" in annotation @ManyToOne in Doctrine ? /** * @ManyToOne(targetEntity="Cart", cascade={"all"}, …

orm doctrine-orm many-to-many
SQL - many-to-many table primary key

This question comes up after reading a comment in this question: Database Design When you create a many-to-many table, should …

sql primary-key many-to-many
Symfony2-Doctrine: ManyToMany relation is not saved to database

I have two PHP model classes named Category and Item. A Category may have many Items and an Item may …

many-to-many doctrine-orm symfony
Django - get objects from a many to many field

I have a m2m field called "admins" inside a model and I need to obtain from a view all …

django django-models many-to-many django-orm
how to make a composite primary key (java persistence annotation)

How to make it so that the table user_roles defines the two columns (userID, roleID) as a composite primary …

java persistence annotations primary-key many-to-many
insert into many2many odoo (former openerp)

I'm trying to insert values into a many2many or one2manhy relation table in odoo (former OpenERP). Do you …

insert many-to-many odoo
Laravel Eloquent ORM - Many to Many Delete Pivot Table Values left over

Using Laravel, I have the following code $review = Review::find(1); $review->delete(); Review has a many to many relationship …

laravel orm many-to-many eloquent
How do I work with many-to-many relations in Yii2

For example in one-to-many due to documentation (http://www.yiiframework.com/doc-2.0/guide-db-active-record.html#relational-data) you can link two models …

php many-to-many yii2
Using EntityRepository::findBy() with Many-To-Many relations will lead to a E_NOTICE in Doctrine

For a Symfony2 project I had to create a relationship between a blog post and so called platforms. A platform …

php symfony doctrine many-to-many database-relations
Saving Many to Many relationship data on MVC Create view

I have some issues with a Many-to-many relationship saving the results of a create view. I want to do a …

asp.net-mvc asp.net-mvc-3 entity-framework razor many-to-many