snapshot of https://github.com/ent/ent.git (master, 2026-09-15; blobs > 131072B omitted)
This commit is contained in:
16
examples/m2mbidi/README.md
Normal file
16
examples/m2mbidi/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# User-Friends Bidirectional M2M Relation
|
||||
|
||||
In this user-friends example, we have a **symmetric M2M relation** named `friends`.
|
||||
Each user can **have many** friends. If user A becomes a friend of B, B is also a friend of A.
|
||||
|
||||
### Generate Assets
|
||||
|
||||
```console
|
||||
go generate ./...
|
||||
```
|
||||
|
||||
### Run Example
|
||||
|
||||
```console
|
||||
go test
|
||||
```
|
||||
Reference in New Issue
Block a user