bx-orm-transactions

Manage BoxLang ORM transactions with commit, rollback, and savepoints.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

BoxLang ORM transaction management helps ensure data integrity by enabling atomic operations, automatic flush/rollback, and consistent session behavior across complex workflows.

Core Features & Use Cases

  • Transaction blocks with automatic commit on success and rollback on error.
  • Savepoints, manual commit/rollback, and nested transactions for advanced control.
  • ORMFlush() and ORMClearSession() support to coordinate in-session changes across multiple entities.

Quick Start

Start a transaction block to atomically persist multiple entities with automatic commit or rollback.

Frequently Asked Questions about bx-orm-transactions

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

FAQPage Schema
How do I manage ORM transactions in BoxLang to ensure atomic saves?

ORM transactions in BoxLang ensure atomic saves by wrapping multiple entity operations in a transaction block that automatically commits on success and rolls back on error. This prevents partial data writes when errors occur.

How do nested transactions and savepoints work with BoxLang ORM?

BoxLang ORM nested transactions use savepoints to allow partial rollbacks within a larger transaction block. You can set intermediate savepoints, roll back to them on specific errors, and still preserve the outer transaction without aborting the entire operation.

Can I use BoxLang ORM transactions with multiple datasources?

Yes, BoxLang ORM transactions support multi-datasource configurations, allowing you to coordinate transaction blocks and session management across different datasources within the same application workflow.

When should I use ORMFlush or ORMClearSession inside a transaction?

Use ORMFlush within a BoxLang ORM transaction to force pending changes to the database, and use ORMClearSession to clear the session cache. Both coordinate in-session changes across multiple entities during active transaction blocks.

How do I manually commit or rollback a BoxLang ORM transaction instead of relying on automatic behavior?

BoxLang ORM provides explicit commit and rollback functions for manual transaction control, allowing you to override the automatic commit-on-success and rollback-on-error defaults when you need custom logic or conditional saves.