agentsclimarketplace

Bx orm configuration

Skill ortus-boxlang/skills/boxlang-modules/bx-orm/bx-orm-configuration

BoxLang AI skills repository and Claude Plugin

Install
npx -y skills add ortus-boxlang/skills --skill bx-orm-configuration

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use this skill when configuring bx-orm in BoxLang: Application.bx ormSettings, enabling the ORM, datasource setup, dbcreate options, dialect selection, entity paths, event handling, session management settings, and secondary cache configuration.

SKILL.md

4.9 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it

bx-orm: Configuration

Enabling ORM in Application.bx

class {

    this.datasource = "myApp"  // default datasource for ORM

    this.ORMenabled = true
    this.ormSettings = {
        // required — always specify to avoid startup performance hit
        entityPaths          : [ "models/entities" ],

        // database schema management
        dbcreate             : "update",      // none | update | dropcreate

        // performance & debugging
        logSQL               : false,
        savemapping          : false,         // save .hbmxml files (debug only)
        ignoreParseErrors    : false,

        // session management (recommended settings)
        autoManageSession    : false,         // manage sessions yourself via transaction{}
        flushAtRequestEnd    : false,         // don't auto-flush; use explicit transactions

        // event system
        eventHandling        : false,
        eventHandler         : "",            // path to global event handler class
    }

}

dbcreate Options

ValueBehavior
none (default)Does not modify the database schema
updateIncrementally adds missing tables/columns; never drops
dropcreateDrops and recreates the entire schema on every ORM reload

Recommendation: Use update in development, none in production (use DB migrations instead).

Key Settings Reference

SettingDefaultDescription
entityPaths(app directory)Directories to scan for persistent classes. Always set this.
datasourcethis.datasourceOverrides the application datasource for ORM
dbcreatenoneSchema management strategy
dialectautoHibernate SQL dialect (usually auto-detected)
logSQLfalseLog generated SQL to console (debug)
flushAtRequestEndtrueAuto-flush at request end — set false in production
autoManageSessiontrueLet engine manage sessions — set false for explicit transactions
eventHandlingfalseEnable ORM lifecycle events
eventHandlerPath to global ORM event handler class
secondaryCacheEnabledfalseEnable L2 cache (Ehcache)
cacheConfigPath to Ehcache XML config file
namingstrategydefaultNaming convention: default, smart, or custom class
sqlScriptPath to SQL file executed after ORM init (seed data)
savemappingfalseWrite Hibernate .hbmxml mapping files (debugging)

Production-Ready Configuration

class {

    this.datasource = "myApp"

    this.ORMenabled = true
    this.ormSettings = {
        entityPaths          : [ "models" ],
        dbcreate             : "none",          // use DB migrations in production
        flushAtRequestEnd    : false,           // explicit transactions only
        autoManageSession    : false,           // manage sessions yourself
        eventHandling        : true,
        eventHandler         : "models.ORMEventHandler",
        secondaryCacheEnabled: true,
        cacheProvider        : "Ehcache",
        cacheConfig          : "./config/ehcache.xml",
        logSQL               : false,
        ignoreParseErrors    : false
    }

}

Dialect Configuration

Let Hibernate auto-detect (works 95% of the time), or specify explicitly:

this.ormSettings = {
    dialect: "MySQL57InnoDB"    // explicit dialect
    // dialect: "PostgreSQL9"
    // dialect: "SQLServer2008"
    // dialect: "Oracle10g"
    // dialect: "H2"
}

Common dialects: MySQL5InnoDB, MySQL57InnoDB, MariaDB, PostgreSQL9, SQLServer2008, Oracle10g, H2, HSQL.

Multiple Datasources

this.ormSettings = {
    entityPaths: [ "models/primary", "models/reporting" ],
    datasource : "primary"   // default; individual entities can override
}

Override per-entity:

class persistent="true" datasource="reporting" {
    // ...
}

ORM Reload (Development)

Force a full reload of ORM mappings (clears entity cache):

ORMReload()

Useful after adding entities or changing mappings during development.

Common Pitfalls

  • ❌ Do NOT omit entityPaths — it will scan the entire application tree (very slow)
  • ❌ Do NOT use flushAtRequestEnd=true in production — leads to unpredictable saves
  • ❌ Do NOT use autoManageSession=true when using explicit transaction{} blocks
  • ✅ Always use explicit transaction {} blocks to demarcate database writes
  • ✅ Set logSQL=true temporarily to debug unexpected queries
  • ✅ Use savemapping=true temporarily to inspect Hibernate XML mappings when debugging

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Gives 0 of the 12 instructions most project setup skills give in ~1.1k tokens

Counted across 999 of the 1,637 authors here whose files we hold, read 2026-08-07

  • Ask one question at a timein 29 of 999, across 28 files
  • Detect the package manager from lockfilesin 28 of 999, across 9 files
  • Present findings to the userin 26 of 999, across 5 files
  • Explore current repo statein 24 of 999, across 3 files
  • Update the agent skills block in place if it existsin 24 of 999, across 3 files
  • Install husky lint-staged and prettierin 23 of 999, across 4 files
  • Create the lintstagedrc filein 22 of 999, across 3 files
  • Commit all changed filesin 22 of 999, across 3 files
  • Run lint-staged to verify it worksin 22 of 999, across 3 files
  • Create the husky pre-commit filein 21 of 999, across 2 files
  • Create a prettierrc file if missingin 21 of 999, across 2 files
  • Initialize huskyin 21 of 999, across 2 files

Said here and by no other author read

  • set ORMenabled to true
  • always specify entityPaths
  • set dbcreate to none in production
  • set flushAtRequestEnd to false
  • set autoManageSession to false
  • use explicit transaction blocks for writes

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 327,069. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.