FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix 8.5 deprecations and null joins causing them by robinsowell · Pull Request #5337 · ExpressionEngine/ExpressionEngine · GitHub

Fix 8.5 deprecations and null joins causing them - #5337

Open
robinsowell wants to merge 1 commit into
7.devfrom
bugfix/model-null-match
Open

Fix 8.5 deprecations and null joins causing them#5337
robinsowell wants to merge 1 commit into
7.devfrom
bugfix/model-null-match

Conversation

Copy link
Copy Markdown
Contributor

left-joined “no related row” data can become a null-id/empty-key related object - and the null throws deprecation warnings.

This fix needs good oversight as it may have wider implications. Approach in the fix- when an alias’s primary key is known and the row has NULL for it, skip that alias entirely; when the key is first learned after hydration, do not store or relate the object if getId() is NULL. This removes the phantom relation while still allowing real 0 or non-null IDs to behave normally.

Tests have been added, but this changes the data. The implementation now skips null primary-key aliases instead of storing them under an empty string.

See the minimal fix in this pr: #5334

It eliminates the deprecation message and preserves existing behavior (where without the deprecation it treated it as a string) BUT do we really want to preserve that existing behavior? Probably not- which is what this pr does.

 left-joined “no related row” data can become a null-id/empty-key related object - and the null throws deprecation warnings.

This fix needs good oversight as it may have wider implications.  Approach in the fix- when an alias’s primary key is known and the row has NULL for it, skip that alias entirely; when the key is first learned after hydration, do not store or relate the object if getId() is NULL. This removes the phantom relation while still allowing real 0 or non-null IDs to behave normally.

Tests have been added, but this changes the data.  The implementation now skips null primary-key aliases instead of storing them under an empty string.
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL