Skip to main content

Relational

Relational fields create foreign key relationships between collections, linking records together. They define how data in one collection relates to data in another.

View all settings
SettingDescription
Field NameText input, required. Unique identifier for the relationship.
Display LabelText input. Human-readable label shown in forms.
Default ValueText input. Pre-filled value for new records (experimental).
Sort OrderNumber input, defaults to 0. Position in field lists.
IconIcon picker. Visual identifier.
Relational LabelDropdown. Field from target collection to display. Creates a lookup automatically.
StatusToggle, defaults to true. Enable or disable the field.
RequiredCheckbox. Make the relationship mandatory.
DescriptionText area. Documents the relationship's purpose.
Form VisibilityDropdown. Show in Add, Edit, or Both forms.
DB Field NameText input. Custom database column name.
Use as IndexCheckbox. Create database index for query performance.
Populate from Logged-In UserCheckbox. Auto-fill from active user's session.

Relation Types

Use the Relation Viewer to select how collections are linked. Each type creates different database structures:

TypeIconDescription
One-to-OneEach record links to exactly one record in the target collection. Example: User → Profile
One-to-ManyOne record links to multiple records in the target collection. Example: Author → Books
Many-to-ManyRecords on both sides can link to multiple records. Creates a junction table. Example: Students ↔ Courses

Basic Settings

Enter a Field Name using camelCase. The Display Label appears in forms. Set the Relational Label to specify which field from the target collection should display — this automatically creates a lookup field.

Relation Viewer

The visual Relation Viewer appears below the basic settings and lets you:

  1. Select the relation type using the icon toggles (One-to-One, One-to-Many, Many-to-Many)
  2. Choose the target collection — the collection you want to link to
  3. Configure record sets — define the source and target keys for the relationship
  4. Auto-generate name — optionally let Hyper name the relationship automatically

Many-to-Many Configuration

For Many-to-Many relationships, you have two options:

  • Table auto generated (checked) — Hyper creates and manages the junction table automatically
  • Manual configuration (unchecked) — You select an existing collection as the junction table and configure:
    • Select collection — Choose the junction collection
    • Source Field — Field linking to the source collection
    • Target Field — Field linking to the target collection

Advanced Settings

The Description text area lets you document the relationship's purpose.

SettingDescription
Form VisibilityChoose when this field appears: Add forms, Edit forms, or Both.
DB Field NameOverride the database column name for the foreign key.
Use as IndexIndexes this field to boost search and query performance.
Populate from Logged-In UserAuto-fills this field using data from the active user's session.

Query Filters

The Query Filters tab lets you restrict which related records can be selected:

SettingDescription
FieldSelect a field from the target collection to filter on.
OperatorComparison operator (is equal to, is not equal to, contains, etc.).
ValueThe value to compare against.
From FormPull the filter value from a form field instead of a static value.
OptionalMake this filter condition optional.

Click Add Filter to add multiple conditions.

Use Cases

  • User → Profile — One-to-One relationship for extended user data
  • Author → Books — One-to-Many for ownership relationships
  • Students ↔ Courses — Many-to-Many for enrollments with junction table
  • Order → Customer — Link orders to customer records
  • Product → Category — Organize products into categories