mirror of
https://github.com/ent/ent.git
synced 2026-05-28 09:49:08 +03:00
ent/doc: add bidi example for o2o
Reviewed By: alexsn Differential Revision: D17046623 fbshipit-source-id: caa43ba34e936cc91618ad56f4eb39965e5aadf9
This commit is contained in:
committed by
Facebook Github Bot
parent
1248026f43
commit
e2b81d2ebc
11
examples/o2obidi/README.md
Normal file
11
examples/o2obidi/README.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# User-Spouse Bidirectional O2O Relation
|
||||
|
||||
An example for a reflexive O2O relation between a User to its spouse (also a User).
|
||||
Each user can have only one spouse. If a user A sets its spouse (using `spouse`) to B,
|
||||
B can get its spouse using the `spouse` edge.
|
||||
|
||||
### Generate Assets
|
||||
|
||||
```console
|
||||
go generate ./...
|
||||
```
|
||||
Reference in New Issue
Block a user