BoxLang 🚀 A New JVM Dynamic Language Learn More...

BoxLang ORM

v1.6.2+27 BoxLang Modules

⚡︎ BoxLang Module: BoxLang ORM

|:------------------------------------------------------:  |
| ⚡︎ B o x L a n g ⚡︎
| Dynamic : Modular : Productive
|:------------------------------------------------------:  |
Copyright Since 2023 by Ortus Solutions, Corp
www.boxlang.io | www.ortussolutions.com

 

Development

To get started hacking on bx-orm:

  1. Clone the repo
  2. Copy the latest boxlang binary jar to src/test/resources/libs/boxlang-1.0.0.jar
  3. Download the MySQL JDBC driver module and unzip it to to src/test/resources/libs/modules/
  4. Run docker-compose up -d mysql in the root

Ortus Sponsors

BoxLang is a professional open-source project and it is completely funded by the community and Ortus Solutions, Corp. Ortus Patreons get many benefits like a cfcasts account, a FORGEBOX Pro account and so much more. If you are interested in becoming a sponsor, please visit our patronage page: https://patreon.com/ortussolutions

THE DAILY BREAD

"I am the way, and the truth, and the life; no one comes to the Father, but by me (JESUS)" Jn 14:1-12

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.


Unreleased

1.6.2 - 2026-04-09

🐛 Fixed

  • BLMODULES-173 - Fixed issue with mutated entity metadata leaking across BoxLang applications.

1.6.1 - 2026-04-09

🐛 Fixed

  • Fixed issue with scale annotation not properly cast to a string in ClassicPropertyMeta.

1.6.0 - 2026-04-02

⭐ Added

  • Adds support for composite IDs.

🐛 Fixed

  • Fixes an issue of lost mappings on entity discoveries, due to wrong parent context being sent.

1.5.0 - 2026-03-27

🐛 Fixed

  • Memory leak on ORM reload — all open Hibernate sessions are now closed before tearing down SessionFactory instances, preventing stale session/factory references from blocking garbage collection after every ORMReload().
  • Memory leak on session factory build failureSessionFactoryBuilder now wipes the BootstrapServiceRegistry when buildSessionFactory() throws, so the registry is not orphaned on the failure path.
  • Stale ORM context after reload — the old ORMContext is removed from the JDBC context before rebuilding, and a fresh one is eagerly installed after the new app is live, eliminating null-window races for concurrent callers.
  • Null context in threaded scenariosEntityTuplizer and related components now obtain the box context safely when executing in a non-request thread.
  • Null pointer when the method does not exist on a tuplizer call — added an existence check before invoking optional methods.
  • Improved exception logging to include full stack traces throughout the ORM lifecycle.
  • Fixed issue with dbdefault annotation not properly cast to a string in ClassicPropertyMeta.

⭐ Added

  • Use a deterministic directory name based on config content rather than a hashcode of the config file path for generated mapping files, ensuring consistent mapping file usage across different environments and absolute paths.

⚡ Changed

  • Hot-path interception performance — all interceptorService.announce() calls on hot code paths (entity instantiation, config load) are now guarded with hasState() checks and use lazy Struct suppliers, avoiding unnecessary struct allocation when no listeners are registered.
  • ORMConfig now receives and threads the IBoxContext through process() and getAppDefaultDatasource() so the correct application datasource is resolved in all execution contexts.
  • ORMService.reloadApp() now performs an atomic put-and-swap of the new/old ORMApp in the registry to minimize the disruption window for requests running concurrently with a reload.

1.4.1 - 2026-03-23

⛓️‍💥 Changed

  • This version requires Boxlang Runtime v1.11.x and above

🗑 Deprecated

  • The autoGenMap configuration setting is now deprecated in favor of generateMappings. Same function, different name. See BLMODULES-119 for details.

⭐ Added

  • BLMODULES-119 - Add support for generateMappings=false (aliased as autoGenMap for backwards compatibility) to disable automatic mapping generation and require manual mapping files.

🐛 Fixed

  • BLMODULES-136 - Fix issue with naming strategy being double-applied on table and column identifiers.
  • BLMODULES-146 - Fix issue where rollbacks, commits, etc. inside a transaction block were not properly scoped to the transaction block and could affect the entire session.

1.4.0 - 2026-02-06

⛓️‍💥 Changed

  • This version requires Boxlang Runtime v1.11.x and above

🐛 Fixed

  • BLMODULES-120 - Add new settings for lazy and defaultBatchSize to provide compat implementations
  • BLMODULES-130 - Fix collection handling for java List objects - which hibernate returns
  • Transaction management udpates to deal with complex nested transactions
  • Ensure manual flush mode when autoManageSession is false
  • Add savepoint interception for nested transactions and flush

1.3.0 - 2026-01-07

🐛 Fixed

  • BLMODULES-110 - Implement EntityTuplizer.getEntityMode() for relationship getters
  • BLMODULES-113 - Drop unnecessary logging on request end for non-ORM requests
  • BLMODULES-117 - Resolve transaction interception error when no ORM App is present
  • BL-2039 - Fix "Datasource with name ... not found" in empty transactions on subsequent requests

⭐ Added

  • BLMODULES-118 - Enable table, schema, and catalog annotations for joined subclasses.
  • BL-2052 - Move ORM context removal to shutdown listener for improved datasource cleanup on request end.

1.2.0 - 2025-12-05

🐛 Fixed

  • BLMODULES-102 - Fix ORM usage in threads causing ConcurrentModificationException
  • BLMODULES-109 - Fix queries on null relationships.

1.1.3 - 2025-11-04

🐛 Fixed

  • BLMODULES-94 - Fix incorrect casting in Getter
  • BLMODULES-96 - Fix ORMExecute query handling of WHERE clauses with object params
  • BLMODULES-101 - Fix NPE due to null oldState in PreUpdate event listener

1.1.2 - 2025-09-06

🐛 Fixed

  • BLMODULES-84 - Resolved incorrect location of many-to-one on discriminated child
  • BLMODULES-85 - Resolved an issue where transaction interception points would throw an error on non-orm-enabled applications
  • BLMODULES-88 - Resolved an issue where entity modifications during orm events were not persisting correctly to the database
  • BLMODULES-90 - Resolved an issue where numerics were not being coerced correctly to strings on applicable properties when used in ORMExecuteQuery

1.1.1 - 2025-08-27

🐛 Fixed

  • Changed Array.fromString usage to use ListUtil as the method was removed from the Array class in v1.5.0 of the core
  • BLMODULES-83 - Resolved inheritiance and mappedSuperClass issues with 3+ levels
  • BLMODULES-80 - Fix for class relationships not being found due to core compiler casing changes

1.1.0 - 2025-08-04

⛓️‍💥 Changed

🐛 Fixed

  • Updates to Request Context based on BoxLang v1.4.0 updates
  • Lots of dependency updates

1.0.11 - 2025-06-10

🐛 Fixed

  • Fixed issue with default cache not being created when cache provider was empty - Resolves BLMODULES-53
  • Fix error starting up on non-ORM apps - Resolves BLMODULES-49
  • Add support for tinyint and tinyinteger ORM types - Resolves BLMODULES-59
  • Skip type conversion on version properties - Resolves BLMODULES-45
  • Drop ormApp instantiation in baseORMBIF - Fixes BLMODULES-54
  • Improve default datasource look up and throw error if empty - See BLMODULES-56

1.0.10 - 2025-05-03

🐛 Fixed

  • Throw or log an error when class annotation on association is an empty string - Resolves BLMODULES-50
  • Fix support for dataType annotation on version properties - Resolves BLMODULES-51

⭐ Added

  • Implement 'index' annotation - Resolves BLMODULES-47
  • Implement multi-column support in column and fkcolumn - Resolves BLMODULES-48
  • Implement cache support at the property level - Resolves BLMODULES-52

1.0.9 - 2025-04-29

🐛 Fixed

  • Implement elementType,elementColumn annotations - Resolves BLMODULES-46
  • Fixes for map collection when structkeytype or structkeycolumn are ignored - See BLMODULES-45
  • Skip usage of AttributeConverter on identifier properties - Resolves BLMODULES-44

1.0.8 - 2025-04-25

⭐ Added

  • Set hibernate version in build so ORMGetHibernateVersion() stays accurate - See a8c7c16

🐛 Fixed

  • Foreign key must have same number of columns as the referenced primary key - Resolves BLMODULES-41
  • Missing FKColumn on To-Many Relationship Should Check the Inverse Relationship for Column data - Resolves BLMODULES-42
  • XMLWriter - Skip id,composite-id XML rendering on subclasses - Resolves BLMODULES-38
  • XML Writer - Skip generator on composite keys - Resolves BLMODULES-40
  • XMLWriter - Don't set insert or update on one-to-one elements - Resolves BLMODULES-39
  • Fix support for 'params' attribute string notation - See BLMODULES-40

1.0.7 - 2025-04-14

🐛 Fixed

  • Fix string casting error on lazy property annotation

1.0.6 - 2025-04-14

🐛 Fixed

  • Fixed support for custom naming strategies - See 8e68206
  • Fixed "smart" naming strategy when entity name begins with an uppercase character - See b47b512
  • Move compat configuration to bx-compat-cfml - See c8b7173
  • Fixed the two types of discriminator generation order - See ea62a62
  • fix bag element being appended to wrong node on subclasses - See f82b2ac
  • change to use caster so that lazy=true does not error - See 0096387

⭐ Added

  • Add missing date property type - See c6ec8a2
  • Add alternate spellings for big decimal and big integer - See 5e199f9
  • Add flush after commit on transaction end - See e2df378

1.0.5 - 2025-04-07

🐛 Fixed

  • Removed debugging code

1.0.4 - 2025-04-06

🐛 Fixed

  • Metadata parsing throws error on empty class despite skipCFCWithError setting - Resolves BLMODULES-37

1.0.3 - 2025-04-06

🐛 Fixed

  • EntityLoad returning incorrect results with criteria struct filter on parent properties - Resolves BLMODULES-36
  • Hibernate Criteria Querys using get are returning proxies instead of the entity - Resolves BLMODULES-35
  • ensure proxies in session are expanded when a load is requested - See 5b07e2c
  • Error on first ORM request after Application Timeout - Resolves BLMODULES-30
  • BoxProxy Struct Implementation causes validation exceptions - Resolves BLMODULES-33

1.0.2 - 2025-04-04

No significant changes.

1.0.1 - 2025-04-04

⭐ Added

  • Allow options as third arg to ORMExecuteQuery - See b5efc84
  • Add handling for not null on to-one relationship - See 6792fb0

🐛 Fixed

  • Attempt casting uniqueOrOrder to string in EntityLoad BIF - See 98f6734
  • Ignore null uniqueOrOrder argument in EntityLoad BIF - See 394d9ba
  • Fix chicken/egg issues with app startup by lazy-initializing the EventHandler - See 699f15b
  • WrongClassException when re-querying for the same object in a session - Resolves BLMODULES-12
  • Disable not-null annotation usage on one-to-one relationships - See c512848
  • fix explicit nulls on setters - See 819fffb
  • Auto-generated has methods are overriding declared methods in ORM entities - Resolves BLMODULES-31
  • x-to-one generated hasX() methods are not returning the correct values - Resolves BLMODULES-32

1.0.0 - 2025-03-26

  • First iteration of this module

$ box install bx-orm

No collaborators yet.
     
  • {{ getFullDate("2024-09-12T15:52:38Z") }}
  • {{ getFullDate("2026-04-09T20:09:35Z") }}
  • 4,157
  • 12,598