hormo studio
  • Getting Started
  • Introduction
    • How it works ?
    • Create Project
    • Playground
  • Models
    • Create model
    • Properties
    • Field types
    • UI Types
    • Options
    • Validations
    • Relations
    • Built-in User model
  • Database
    • Create Database
    • Connect to model
  • Restful API
    • Playground
    • Filters
    • Access Token
  • Dashboard
    • Usage
    • Manage users
    • Change Authentication
  • Monitoring
    • List of reports
    • Watch requests
  • Documentation
    • Export generated docs
  • Deployment
  • Licence
Powered by GitBook
On this page

Was this helpful?

  1. Models

Relations

PreviousValidationsNextBuilt-in User model

Last updated 2 years ago

Was this helpful?

The relations key defines relationships between models. Hormo Studio managing relations in you back-end services by set options as relations configs easily as below:

Key

Type

Description

foreignKey

String

Optional foreign key used to find related model instances.

ref(model)

String

Name of the related model. Required.

type

String

Relation type. Required

hasMany

hasManyThrough and belongsTo

Filter

Object/Function

You can filter a relationship field using the filters option. { "type": "user" }

Built-in User model