test: support full-null relationship coverage - #312
Open
elpete wants to merge 2 commits into
Open
Conversation
Collaborator
Author
|
Attempted reproduction: I ran the existing public empty-belongs-to flow on a dedicated Lucee 6.2.8.20 server started with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #154
Issue review
Recommendation: 10/10. Empty belongs-to relationships must work under Lucee full-null support. Null mode is an engine-level compatibility setting, and relationship access should preserve the same semantic result in either representation.
Reasons for:
Tradeoffs:
Reproduction review
I launched a separate Lucee 6.2.8.20 server with
-Dlucee.full.null.support=trueand currentqb 14.0.0-beta.3. The existing public testgetInstance( "Post" ).find( 7777 ).getAuthor()returned null without throwing, so the original Quick/qb exception no longer reproduces.The first full-null suite run exposed seven failing assertions and zero errors. They were stale tests that hard-coded partial-null empty strings or compared snapshots without normalizing null representation; the product behavior itself was correct. I updated those tests to assert public null semantics where possible and normalized only the representation fields in snapshot-focused tests.
Implementation
No production behavior change was necessary. The test updates:
isNullAttribute()andisNullValue()for entity null behavior;externalID;Validation
Lucee full-null mode:
Normal Lucee mode:
Also:
box run-script formatgit diff --checkDependency: latest prerelease
qb 14.0.0-beta.3.