Skip to content

fix: support full null lazy dependencies - #87

Open
elpete wants to merge 1 commit into
developmentfrom
fix/full-null-lazy-state
Open

fix: support full null lazy dependencies#87
elpete wants to merge 1 commit into
developmentfrom
fix/full-null-lazy-state

Conversation

@elpete

@elpete elpete commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Summary

BaseORMService used direct isNull() checks for lazily initialized variables. Full-null runtimes omit those variables entirely, so the first public getter call raised an undefined-element exception instead of creating the dependency.

This change makes the ORM utility, ORM event handler, dynamic processor, and object populator getters explicitly key-aware while preserving their existing lazy caching behavior.

Discovered while validating coldbox-modules/mementifier#46 for the expanded full-null matrix in coldbox-modules/quick#312.

Regression coverage

  • Adds a TestBox regression that creates a real BaseORMService and exercises all four public getters.
  • Uses Java identity hashes to verify repeated calls return the cached instance.
  • Adds a standalone Adobe 2025 full-null HTTP regression that exercises the public getters without requiring ColdBox application startup.
  • Runs that full-null endpoint in CI for Adobe 2025 rows.

Before the source fix, the endpoint failed at models/BaseORMService.cfc:171 with Element ORM is undefined. After the four guards, it returns PASS.

Validation

  • standalone Adobe 2025 full-null endpoint: PASS
  • focused BaseORMService public-API bundle: 52 passed, 0 failed, 0 errored
  • Adobe 2025 normal null mode: 322 passed, 0 failed, 0 errored, 23 skipped
  • Adobe 2025 full null: 322 passed, 0 failed, 0 errored
  • cfformat checks and git diff --check passed

The full-null suite was validated with the proposed dependency fixes in ColdBox/coldbox-platform#686, Ortus-Solutions/TestBox#200, and coldbox-modules/mementifier#46. The standalone CI regression does not depend on those pull requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant