bx-orm-querying

Query and manage ORM entities in BoxLang with HQL-style queries and lifecycle BIFs.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables developers to query and manage ORM entities in BoxLang, providing consistent patterns for loading, persisting, and mutating data while reducing boilerplate.

Core Features & Use Cases

  • EntityLoad(): load multiple or single entities with filters, sorting, and pagination.
  • EntityLoadByPK(): load by primary key, including composite keys.
  • EntityLoadByExample(): load by example prototype entities.
  • ORMExecuteQuery(): run HQL-like queries with named or positional parameters, with optional pagination and caching.
  • Entity lifecycle BIFs: entitySave, entityDelete, entityNew, entityMerge to manage persistence across transactions.
  • Use Case: fetch active users, apply sorting, and persist updates in a transaction.

Quick Start

Load active users with entityLoad and a simple filter, apply pagination, and persist changes with entitySave inside a transaction.

Frequently Asked Questions about bx-orm-querying

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

FAQPage Schema
How do I query ORM entities in BoxLang using HQL-style queries?

You can query ORM entities in BoxLang using the ORMExecuteQuery BIF, which supports HQL-style queries with named or positional parameters, pagination, and optional caching for optimized repeated data access.

What's the best way to load a single entity by its primary key in BoxLang ORM?

Use the EntityLoadByPK BIF to load an entity by its primary key in BoxLang. This function supports standard primary keys as well as composite keys for flexible enterprise data access patterns.

Can I load BoxLang ORM entities by providing an example prototype entity?

Yes, you can use the EntityLoadByExample BIF to load entities by providing an example prototype. This allows you to query and retrieve matching records based on the properties of the prototype entity.

How do I manage the persistence lifecycle of ORM entities across transactions in BoxLang?

Manage the ORM entity persistence lifecycle using BoxLang BIFs such as EntitySave, EntityDelete, entityNew, and entityMerge to apply updates and mutations within standard enterprise data access transactions.

Does BoxLang ORM querying support sorting and pagination for filtering active records?

Yes, the EntityLoad BIF supports loading multiple or single entities with specific filters, sorting, and pagination, allowing you to efficiently fetch filtered data like active users.

Do I need a specific Hibernate-compatible module to use ORM querying in BoxLang?

Yes, ORM querying requires a BoxLang ORM module compatible with Hibernate-style semantics to enable EntityLoad, ORMExecuteQuery, and lifecycle management functions with optional caching.