coldbox-orm-cborm

Manage CBORM ORM operations and queries for ColdBox applications.

1|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ColdBox/skills --skill coldbox-orm-cborm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coldbox-orm-cborm
Source: https://github.com/ColdBox/skills/tree/main/orm/cborm
Command: npx skills add https://github.com/ColdBox/skills --skill coldbox-orm-cborm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provide clear, actionable guidance for working with the cborm module in ColdBox so developers can implement reliable ORM services, criteria queries, transactional operations, and ORM event handling without wrestling with low-level Hibernate details.

Core Features & Use Cases

  • BaseORMService and ActiveEntity patterns: implement standard CRUD, listing, counting, and HQL execution using a consistent API.
  • Criteria and DetachedCriteria queries: build complex filters, projections, joins, pagination, and counts using the cborm fluent criteria API.
  • Virtual entity services and DI: inject and use VirtualEntityService@cborm to operate on entities without dedicated service classes.
  • ORM events and transactions: register lifecycle handlers (preInsert, preUpdate, preDelete, postInsert) and perform transactional operations with rollback handling.
  • Use Case: implement a UserService that lists active users, enforces business rules on delete via an ORM event handler, and performs fund transfers inside transactional boundaries.

Quick Start

Create a BaseORMService method that lists active users using cborm criteria queries and include an example of a transactional save with rollback handling.

Frequently Asked Questions about coldbox-orm-cborm

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

FAQPage Schema
How do I build complex criteria queries in ColdBox using Hibernate?

Build complex Hibernate criteria queries in ColdBox using the cborm fluent criteria API to apply filters, projections, joins, pagination, and counts without writing low-level SQL. It supports DetachedCriteria for advanced multi-entity filtering.

How do I handle database transactions and rollback in a ColdBox ORM application?

Handle database transactions in a ColdBox ORM application using cborm transactional operations with built-in rollback handling. Execute fund transfers and batch updates within transactional boundaries to ensure data integrity during failures.

How do I create ORM event handlers for preInsert and preUpdate in ColdBox?

Create ORM event handlers in ColdBox by registering lifecycle callbacks like preInsert, preUpdate, preDelete, and postInsert. Use programmatic ORM event handling to enforce business rules automatically before entity persistence.

Can I use dependency injection with virtual entity services in ColdBox?

Yes, you can use dependency injection with virtual entity services in ColdBox by injecting VirtualEntityService@cborm. Operate directly on entities without creating dedicated service classes for standard CRUD and listing operations.

What is the best way to execute HQL queries in a ColdBox application?

The best way to execute HQL queries in a ColdBox application is using the BaseORMService or ActiveEntity patterns. These provide a consistent API for standard CRUD, listing, counting, and HQL execution across your entities.