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.

How to sort NULL values last using Eloquent in Laravel

I've got a many to many relationship between my employees and groups table. I've created the pivot table, and all …

php many-to-many laravel eloquent
Saving many-to-many relationship in Entity Framework Core

For example, I have 3 classes, which I'm using for many-to-many relationship: public class Library { [Key] public string LibraryId { get; set; } …

c# many-to-many entity-framework-core
Doctrine 2: How to handle join tables with extra columns

How do I setup a join table with extra columns, or a many-to-many association with additional properties, in Doctrine 2?

properties doctrine-orm many-to-many jointable
SqlAlchemy and Flask, how to query many-to-many relationship

I need help creating SqlAlchemy query. I'm doing a Flask project where I'm using SqlAlchemy. I have created 3 tables: Restaurant, …

python sql sqlalchemy many-to-many flask
Django - Cascade deletion in ManyToManyRelation

Using the following related models (one blog entry can have multiple revisions): class BlogEntryRevision(models.Model): revisionNumber = models.IntegerField() title = …

django many-to-many cascading-deletes
Deleting record in many-to-many table

I'm following the security chapter of the Symfony 2 book. There's is an example with a table USERS and GROUPS. There …

doctrine symfony many-to-many dql
Many-to-many relationship with NoSQL database

I want to implement a taxonomy structure (geo terms) for my node.js application with NoSQL database. I had a …

database-design nosql many-to-many taxonomy document-oriented-db
How to add column in ManyToMany Table (Django)

From the example of Django Book, I understand if I create models as following: from xxx import B class A(…

python django many-to-many
How to delete many-to-many relationship in Entity Framework without loading all of the data

Does anyone know how to delete many-to-many relationship in ADO.NET Entity Framework without having to load all of the …

entity-framework ado.net many-to-many
Whats the difference between a OneToOne, ManyToMany, and a ForeignKey Field in Django?

I'm having a little difficulty getting my head around relationships in Django models. Could someone explain what the difference is …

python django many-to-many foreign-key-relationship one-to-one