Installation
Quickly install cborm
Leverage CommandBox to install into your ColdBox app:
# Latest version
install cborm
# Bleeding Edge
install cborm@beSystem Requirements
BoxLang 1.0+
Adobe ColdFusion 2023+
Lucee 5.x+
Hibernate 5.x+ (Hibernate 3 is no longer supported as of CBORM 4.9.0)
Breaking Change: CBORM 4.9.0 dropped support for Hibernate 3. All supported CFML engines must use Hibernate 5.x or later. If you're using an older CFML engine with Hibernate 3, you must upgrade before using CBORM 4.9.0+.
Application Setup
If you are using the ORM EventHandler or ActiveEntity or any ColdBox Proxies that require ORM, you must create an Application Mapping to the module in the Application.bx|cfc like this:
# In the pseudo constructor
this.mappings[ "/cborm" ] = COLDBOX_APP_ROOT_PATH & "modules/cborm";This is required because the ORM engine is bootstraped before ColdBox fully initializes and thus the module paths are not yet registered.
WireBox DSL
The module registers a new WireBox DSL called entityservice which can produce virtual or base ORM entity services. Below are the injections you can use:
entityservice- Inject a global ORM serviceentityservice:{entityName}- Inject a Virtual entity service according toentityName
Module Settings
Here are the module settings you can place in your ColdBox.cfc under moduleSettings -> cborm structure or by creating a cborm.cfc in the config/modules directory.
ColdBox 7+ Config:
Validation
We have also integrated a UniqueValidator from the validation module into our ORM module. It is mapped into WireBox as UniqueValidator@cborm so you can use it in your model constraints like so:
Supported Hibernate Versions
BoxLang 1.0+
Hibernate is bundled with the bx-orm module. Just install it via CommandBox:
The version of Hibernate bundled is:
Hibernate 5.6+ - https://hibernate.org/orm/documentation/5.6/
Lucee 5+
Hibernate is bundled with the Ortus ORM Extension for Lucee: https://forgebox.io/view/D062D72F-F8A2-46F0-8CBC91325B2F067B. You can find our source code here: https://github.com/ortus-solutions/extension-hibernate
You can install it via the Lucee Administrator, by using th extension ID: D062D72F-F8A2-46F0-8CBC91325B2F067B or via CommandBox:
BY JVM argument
The version of Hibernate bundled is:
Hibernate 5.6+ - https://hibernate.org/orm/documentation/5.6/
Please note that our Lucee Hibernate Extension is on LTS and will only receive critical bug fixes and security patches. New features and enhancements will be focused on the BoxLang BX-ORM module.
Adobe 2023+
Hibernate 5.2+ - https://hibernate.org/orm/documentation/5.2/
Last updated
Was this helpful?