bx-orm-relationships

Define and manage ORM relationships between BoxLang entities.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ortus-boxlang/skills --skill bx-orm-relationships
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: bx-orm-relationships
Source: https://github.com/ortus-boxlang/skills/tree/main/boxlang-modules/bx-orm/bx-orm-relationships
Command: npx skills add https://github.com/ortus-boxlang/skills --skill bx-orm-relationships

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams model and enforce complex ORM relationships across BoxLang entities to ensure correct data integrity and navigability within applications.

Core Features & Use Cases

  • Supports one-to-one, one-to-many, many-to-one, and many-to-many relationships with explicit foreign keys and join tables.
  • Enables lazy loading, cascade options, and inverse/singular name configuration for clean API surfaces.
  • Provides practical examples and annotations for defining relationships in BXLang entity classes.

Quick Start

Define an ORM relationship in your BXLang model by declaring a field with the appropriate fieldtype and related class.

Frequently Asked Questions about bx-orm-relationships

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define ORM relationships in BoxLang entities?▼

Define ORM relationships in BoxLang entities by declaring a property with the appropriate fieldtype and related class. This configures one-to-one, one-to-many, many-to-one, or many-to-many mappings, including foreign keys and explicit join tables.

What's the best way to configure lazy loading and cascade options for BoxLang ORM?▼

Configure lazy loading and cascade options by setting the corresponding attributes on your BoxLang entity relationship properties. This ensures data loads on demand and cascade operations propagate correctly across related entities.

Does BoxLang ORM support many-to-many relationships with explicit join tables?▼

BoxLang ORM supports many-to-many relationships with explicit join tables. You define the link table, foreign key columns, and related class references directly on the entity property to ensure robust relational mapping.

Can I enable bidirectional navigation between BoxLang ORM entities?▼

Bidirectional navigation is enabled by configuring inverse and singularName attributes on your BoxLang ORM entity relationships. This provides a clean API surface for navigating between associated objects in both directions.

What constraints must I satisfy when mapping foreign keys in BoxLang ORM?▼

Mapping foreign keys in BoxLang ORM requires satisfying constraints for property fieldtype, class references, fkcolumns, linktable, singularName, and cascade attributes to ensure correct relational data integrity.

Why do my BoxLang ORM relationships fail to enforce data integrity?▼

ORM relationships fail to enforce data integrity when entity properties lack proper fieldtype declarations, fkcolumns, linktable configurations, or cascade attributes required by the BoxLang relational mapping constraints.