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

Fixed global search #498

Merged
merged 2 commits into from
Feb 18, 2025
Merged

Fixed global search #498

merged 2 commits into from
Feb 18, 2025

Conversation

jfkonecn
Copy link

closes https://github.com/oncokb/oncokb-pipeline/issues/657

Currently we're getting an error Parameter 1 of function 'upper()' has type 'STRING', but argument is of type 'java.lang.String' mapped to 'CLOB'

The name column in the drug table is of type longtext which apparently is a CLOB type so the name column needs to be explicitly casted to a string type.

@jfkonecn jfkonecn requested a review from calvinlu3 February 14, 2025 19:07
if (criteria.getName() != null && criteria.getName().getContains() != null) {
specification = specification.or((root, _ignore, cb) -> {
return cb.like(
cb.lower(root.get(Drug_.name).as(String.class)),
Copy link
Contributor

Choose a reason for hiding this comment

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

MySQL LIKE operator should already compare ignoring case right? Does that mean we don't need cb.lower(root.get(Drug_.name).as(String.class)), instead we can trim to just root.get(Drug_.name).as(String.class)?

@calvinlu3 calvinlu3 added the fix Fix tag for release label Feb 18, 2025
@jfkonecn jfkonecn merged commit 61b8ed6 into oncokb:rc Feb 18, 2025
2 checks passed
@jfkonecn jfkonecn deleted the hotfix/error branch February 18, 2025 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Fix tag for release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants