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.
Bumped Lucee development dependency to 5.4.5.23 to fix a potential Authentication BypassCVE-2023-48795OPEN THIS LINK IN A NEW TAB
issue in Lucee's com.github.mwiede:jsch
dependency.
As with most Lucee CVEs in this repo, this security issue is merely theoretical as this extension does not bundle Lucee. This is why you should keep your Lucee version up to date. π
- Fixes a regression on OOE-26 where empty string values are coerced to
NULL
when an ORM type is declared. Originally reported against6.4.0
, resolved in6.5.0
, then regressed in6.5.1
. - Resolves OOE-26.
6.5.1 - 2024-02-20
- Fixes empty string values coercing to
NULL
when no property type is declared. - Resolves OOE-25, introduced in 6.5.0.
6.5.0 - 2024-02-16
- Fixes an incorrect property name lookup for the
unsavedValue
persistent property attribute. - Fixes the pre-event listeners to ignore empty strings in entity state properties if the field type is one of
string
,character
, ortext
. This resolves issues where apreInsert()
orpreUpdate()
throws a "can't cast [] to date value" when processing event listeners if a date field (for example) is unpopulated or has an emptydefault
attribute.
Add the entity name to the exception message when attempting to persist changes from preInsert
or preUpdate
event listeners. The updated exception message is now:
Error populating event state for persistance in [<entity name>] entity pre-event listener method: <error message from Hibernate>
Bump Lucee build dependency to 5.4.4.38
to avoid vulnerable dependencies in the build process.
6.4.0 - 2023-12-05
Resolve an Uncontrolled Resource Consumption vulnerability disclosed on 12/4/2023 by upgrading logback-core
to 1.3.14
. See vulnerability details.
New ORMQueryExecute()
alias for the ORMExecuteQuery
. This new alias behaves identically to the ORMExecuteQuery()
method, but is named consistently with the queryExecute()
method.
- Fixes custom configuration support via
this.ormSettings.ormConfig
. - Fixes named argument support for
entityLoad()
- LDEV-4285 - Fixes named argument support for
entityLoadByPK()
- LDEV-4461
While not technically a change in ORM functionality, the useDBforMapping
implementation has been greatly improved "under the hood", with tests to boot.
6.3.2 - 2023-09-29
Fixed pre-event listeners to include parent component properties when checking for entity mutations to persist back to the event entity state. This resolves issues with changes made in preInsert()
/preUpdate()
not persisting if the changes are made on a persistent property from a parent component. Resolves OOE-14.
6.3.1 - 2023-09-26
Refactored nullability checks to occur after pre-event listener methods fire. Resolves OOE-12
Added context to the error message in CFCGetter
, which handles retrieving entity values from Hibernate code. This improves odd error messages in some edge cases with the Hibernate tuplizer.
6.3.0 - 2023-08-18
Switched the EHCache library to use net.sf.ehcache.internal:ehcache-core.
- Upgrades EHCache version from
2.10.6
to2.10.9.2
. - Drops an embedded
rest-management-private-classpath
directory - Drops a number of (unused) vulnerable jackson and jetty libraries such as jackson-core.
- As an added bonus, this reduces the final
.lex
extension file size by over 6 MB. π
Note: While it is not 100% clear, some of these CVEs may have been false positives.
6.2.0 - 2023-08-03
This brings the Hibernate dependencies up to date (released Feb. 2023), and should not change any CFML-facing features for most users. (See CLOB columns in Postgres81)
See the migration guides for more info:
Due to the Hibernate 5.6 upgrade, if you are using the PostgreSQL81
dialect and have CLOB
columns in your database, it is recommended you migrate existing text columns for LOBs to oid
.
The default ehcache.xml
for EHCache changed to include clearOnFlush="true"
and diskSpoolBufferSizeMB="30MB"
properties to match Adobe ColdFusion 9's default ehCache.xml
config. Both these values represent default settings in EHCache itself.
- Fixes handling of
"timezone"
-typed column values. Previously, fields defined withormtype="timezone"
would neither use thedefault
value nor allow new values to be set. OOE-10 - Fixes entity state changes in
preInsert()
/preUpdate()
listeners for properties with nodefault
defined. OOE-9
6.1.0 - 2023-07-14
- Lots of java source code cleanup that won't affect the CFML experience, but will aid in faster development and fewer bugs.
- Any hibernate exceptions returned during schema generation are once again logged to the Lucee ORM log file.
- Dropped the public
getDialectNames()
method from the Dialect class. This method was unused (to my knowledge) and unnecessary.
- Switched to Snyk vulnerability scanner to limit false positives. Security vulnerabilities will now be published on the GitHub repository's Security Advisories page.
- Bumped Lucee dependency to
5.40.80
to remove vulnerability notices on org.apache.tika:tika-core and commons-net:commons-net. These vulnerabilities are only theoretical, since Lucee is aprovided
dependency and not bundled with the extension.
The extension will now throw an error if you try to configure an unsupported cache provider like "jbosscache"
, "swarmcache"
, etc. Previously, the extension would silently switch to ehcache if any cache provider besides EHCache was configured.
This version re-enables Hibernate logging via SLF4j and LogBack. Hibernate root and cache loggers are defaulted to ERROR
level, while SQL logging is set to DEBUG
if this.ormSettings.logSQL
is enabled. (Set to true
.)
The extension GitHub Release page now generates a dependency CVE report via Jeremy Long's OWASP dependency-check maven plugin. Any known CVEs contained in dependencies ( excluding test
and provided
-scoped dependencies) will be noted in each release's CVE report artifact.
- Java source moved to
extension/src/main/java
- All java classes are now under the
ortus.extension.orm
package - Dropped the java source format-on-push in favor of format-on-save IDE tooling
- Internal tests rewritten to native Testbox specs
- Cloned all ORM tests from the Lucee repository
- Updated to TestBox 5.0
We re-architected the build to inline most dependencies. I.e. we no longer copy in extension dependencies as (custom-built) OSGI bundles, but instead as compiled classes.
- This resolves intermittent issues with bundle resolution and/or duplicate bundle collision upon installing the ORM extension into a Lucee server prior to uninstalling the Lucee Hibernate extension.
- This also removes a number of direct dependencies on custom OSGI bundles, thus it is more reliable and will offer easier dependency upgrades with less pain.
- The
"node"
attribute is deprecated in Hibernate 5.x, and is no longer generated on HBM/XML mapping files to avoid Hibernate warning that "Use of DOM4J entity-mode is considered deprecated".
- The
.fld
definition file for all built-ins was missed during the conversion to a Maven build. (Since v5.4.29.25). This caused theorm*()
andentity*()
built-in method calls to be picked up by Lucee core before being routed to this extension. No known errors resulted from this mistake, but we feel embarrassed anyway. π - Clear ORM context data once per ORM reload, not once per ORM entity parsing. This should improve ORM startup/reload time and avoid difficult session or cache manager lifecycle issues.
We now set the JAXB ContextFactory
system property based on the JRE version. If less than JRE 11, we set javax.xml.bind.context.factory=com.sun.xml.bind.v2.ContextFactory
. If JRE 11 or greater, we set javax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory
.
This prevents the following warning from being logged on each ORM method call:
WARNING: Using non-standard property: javax.xml.bind.context.factory. Property javax.xml.bind.JAXBContextFactory should be used instead.
See OOE-3.
- We now set a
javax.xml.bind.context.factory=com.sun.xml.bind.v2.ContextFactory
System property to ensure the JAXB API can find its implementation in CommandBox environments. This may trigger a log message, but shouldn't cause any concern. Vanilla Tomcat installations may need to overwrite or clear this property. LDEV-4276
- Improved logo for Lucee admin π€©
- Entity changes made in
onPreInsert()
andonPreUpdate()
do not persist OOE-2
- Switched to Maven for a faster, more stable build process
- Improved entity event listeners for a much speedier ORM startup (8924b58a9058d296e2a783ccfabbf90e26dc9c1b)
- New and Improved logo for Lucee admin visibility (10bdf56a7a78f0221ab1a6e66a5512a92819e5b7)
- Entity has no state when listener method (
onPreInsert
, for example) is fired (014814263b5d31b8bac4c17479c2ca731ceb4e7c, OOE-1)
- Upgraded dom4j library from 1.6.1 to 2.1.4. This removes two potential vulnerabilities in dom4j's XML parsing capabilities.
- ORMExecuteQuery ignores
"unique"
argument ifoptions
struct is passed
- Adds support for
autoGenMap=false
- LDEV-3525 - Adds javadocs auto-published to apidocs.ortussolutions.com
- ORM events not firing (LDEV-4308)
- Session close on transaction end (LDEV-4017)
- "length" not used on varchar fields (LDEV-4150)
- Dramatic improvements in initialization performance
- Cuts ORM reload time by 60%
- Better build/test documentation
- Improved maintenance and build docs