Schema & Collections

Relations


Handling Relations

CodeNx makes complex data relationships easy to manage.

- One-to-Many: One Category has many Products.
- Many-to-Many: Products have many Tags, and Tags belong to many Products.
- Self-Relation: Users follow other Users.

The CLI and Studio handle the heavy lifting of generating junction tables and foreign keys.