snello CMS
  • Snello CMS
  • Get Started
  • Architecture
    • Snello API
    • Snello ADMIN
  • Docker Images
    • Database
    • Storage
    • Mail settings
    • Docker compose
  • Metadata
    • UUIDs
    • To reuse existing database tables
    • Advanced configuration
    • Reserved Metadata Names
  • Field Definitions
    • Data Types
    • Multijoin: database and rest queries
    • CRUD options
  • How to query using REST API
    • metadata api
    • filters & limit & sort
      • protect your api
  • Conditions
    • Multijoin conditions
  • Documents
    • Download endpoint
  • How to publish your web pages
  • Select Queries
  • Authentication & Authorization
    • User & Roles
    • Password recovery
    • Url Map Rules
  • Links
  • Draggables & Droppables
    • angular syntax
  • Deploy in Production
    • Let’s Encrypt
    • Remove Hashbang
    • Traefik
    • Rendertron
  • Notes
    • Micronaut - create extensions
    • Native image
    • Editor for code
    • Multi languages
  • k8s cache distributed
  • Developers Space
    • Java code
    • Angular code
  • Roadmap
    • Java Evolution
    • Angular Evolution
    • Next features
Powered by GitBook
On this page
  • 1) create a "courses" metadata
  • 2) create a "students" metadata
  • 3) snello magic: join table and condition
  • 4) rest api
Edit on GitHub
  1. Field Definitions

Multijoin: database and rest queries

When you add to your metadata a multijoin field, snello will create for you a lot of things.

To understand the snello behavior, we will use an example.

1) create a "courses" metadata

  • uuid [uuid - slug on name]

  • name [string]

  • description [text - tinymce]

2) create a "students" metadata

  • uuid [uuid - slug on surname]

  • name [string]

  • surname [string]

  • courses [multijoin -> courses]

    • Join Table Name: courses

    • Join Table Key: uuid

    • Join Table Fields: name

3) snello magic: join table and condition

When you save (in sequence) courses and students.

  • courses table

  • students table

  • join table: courses_students

A "condition", to map the relationship between tables.

4) rest api

  • /api/courses

  • /api/students

  • /api/students/:id/courses

PreviousData TypesNextCRUD options

Last updated 2 years ago