Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG Update RelatedDataService to properly escape ClassName in Polymorphic relations #10713

Conversation

maxime-rainville
Copy link
Contributor

StandardRelatedDataService escapes ClassName in its query using some hackish logic instead of asking DB to do it for it.

This breaks alternative DB adapters like SQLite.

Parent issue

@maxime-rainville
Copy link
Contributor Author

FYI I ran that fix against a PostgreSQL and SQLite database and the matching test passed without issues.

Copy link
Contributor

@michalkleiner michalkleiner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, legitimate.

@michalkleiner
Copy link
Contributor

The commit prefix should be FIX if you wanted to force-push update that, and then merge it yourself.

@emteknetnz
Copy link
Member

FIX is the standard, though BUG also means it automatically shows in the changelog when it's generated via cow (our release tool), so I don't think we need to hold up merging this just for the prefix - https://github.com/silverstripe/cow/blob/master/src/Model/Changelog/ChangelogItem.php#L61

@emteknetnz emteknetnz merged commit 403f924 into silverstripe:4.12 Mar 1, 2023
@emteknetnz emteknetnz deleted the pulls/4.12/related-data-service branch March 1, 2023 20:56
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.

3 participants