Blog

Ortus ORM Extension Version 6.4.0

Michael Born December 11, 2023

Spread the word

Michael Born

December 11, 2023

Spread the word


Share your thoughts

We're pleased to announce a minor release of the Ortus ORM Extension, v6.4.0! This release includes a vulnerability patch, so we'd recommend you upgrade as soon as possible.

Security Fixes

First and foremost, this release bumps the logback-core logging dependency to resolve a recently-disclosed Uncontrolled Resource Consumption vulnerability.

New Features

This release adds an ORMQueryExecute() alias for the ORMExecuteQuery() built-in function. While not a game-changer in any way, this brings a consistency to the method names for SQL vs HQL queries. Instead of queryExecute() and ORMExecuteQuery(), we now have queryExecute() and ORMQueryExecute():

// Vanilla SQL query
queryExecute( "SELECT * FROM users" );

// HQL query powered by Hibernate
ORMQueryExecute( "FROM User" );

Bug Fixes

This release includes a number of bug fixes, including named argument support for entityLoad() and entityLoadByPK(), as well as fixing support for a custom Hibernate configuration file via this.ormSettings.ormConfig.

Named Argument Support for EntityLoad*() Methods

Named arguments are now supported on EntityLoadByPK():

entityLoadByPK(
    name = "Dealership",
    id = variables.testDealerID
);

as well as entityLoad():

entityLoad(
    name = "Auto",
    id = "foo123"
)

See tickets:

Custom Hibernate Configuration File

The existing ormSettings.ormConfig configuration property is now fixed and documented as working, with passing tests to boot. This is the first iteration of the Hibernate 5+ where we can verify that configuration specified in this manner is taking effect.

this.ormSettings = {
    dbcreate  : "dropcreate",
	ormConfig : "/config/resources/hibernate.cfg.xml",
    // ...
};

Using this ormConfig property, we can point to an XML file containing additional Hibernate configuration:

<!DOCTYPE hibernate-configuration PUBLIC 
    "-//Hibernate/Hibernate Configuration DTD 3.0//EN" 
    "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
    <session-factory>
		<property name="hibernate.session_factory_name">OrtusForTheWin</property>
		<property name="hibernate.globally_quoted_identifiers">true</property>
    </session-factory>
</hibernate-configuration>

Other Improvements

While not technically a change in ORM functionality, the useDBforMapping implementation has been greatly improved "under the hood", with tests to boot.

Upgrade

To upgrade the Ortus ORM Extension version on a running Lucee server, use box install with the extension GUID and version number:

box install D062D72F-F8A2-46F0-8CBC91325B2F067B@6.4.0

If you are using the lucee.extensions environment variable to configure extension installation, you'll want to update that as well:

-Dlucee-extensions='D062D72F-F8A2-46F0-8CBC91325B2F067B;version=6.4.0'

The exact syntax depends on the context. For more information, see Installing the Ortus ORM Extension and the lucee.extensions env var documentation.

For More Info

Check out the full release notes on the extension documentation gitbook, or see the full list of changes on github.com.

Add Your Comment

Recent Entries

BoxLang 1.0.0 Beta 7 Launched

BoxLang 1.0.0 Beta 7 Launched

We are pleased to announce the release of BoxLang 1.0.0-Beta 7! This latest beta version includes improvements and essential bug fixes, but more importantly it certifies the execution of ColdBox HMVC and TestBox.

What is BoxLang?

BoxLang is a modern dynamic JVM language that can be deployed on multiple runtimes: operating system (Windows/Mac/*nix/Embedded), web server, lambda, iOS, android, web assembly, and more. BoxLang combines many features from different progr

Luis Majano
Luis Majano
July 26, 2024
New BoxLang Feature: Java Method References and Higher-Order Functions

New BoxLang Feature: Java Method References and Higher-Order Functions

We’ve added more goodies to our BoxLang Java interop: method references and higher-order functions. CFML has never let you do these things, making Java Interop feel like a second-class citizen. But with BoxLang, we’re elevating Java integration to a new level.

Maria Jose Herrera
Maria Jose Herrera
July 26, 2024
Level Up Your ColdFusion Skills with our Virtual Live Training: ColdBox from Zero to Hero

Level Up Your ColdFusion Skills with our Virtual Live Training: ColdBox from Zero to Hero

Level Up Your ColdFusion Skills with our Virtual Live Training: ColdBox from Zero to Hero

Are you a CFML developer looking to take your skills to the next level? Look no further than the ColdBox from Zero to Hero Virtual Live Training! This intensive two-day course will equip you with the knowledge and expertise to build robust and scalable applications using ColdBox 7, the latest version of the most popular CFML MVC framework.

What You'll Learn:

  • Master the Fun...

Cristobal Escobar
Cristobal Escobar
July 24, 2024