-
Notifications
You must be signed in to change notification settings - Fork 72
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
IgnoreCase problem #47
Comments
I'm a little hesitant to do that because when you do operations like that on a database, it results in very bad performance since the database needs to scan the entire database to find the result. By not making the I'll think about it, but since there's a work-around (just use |
Why deal.getInstrument().getName().equalsIgnoreCase(instrumentName) is not translated to exactly the same SQL query as deal.getInstrument().getName().toLowerCase().equals(instrumentName.toLowerCase())? |
That's how I would translate it. That's also really, really slow because the database needs to read the whole hard disk of data to execute it. I don't want people to accidentally do that, so that's why I don't want to provide a method for that. |
Ok, understand so maybe a good idea is to add some kind of warning if someone wants to execute methods like toLowerCase() or toUpperCase() on a column. My point is that if someone accidentally writes deal.getInstrument().getName().toLowerCase() DB will need to read all data from disk. |
deal.getInstrument().getName().toLowerCase().equals(instrumentNameLowerCase)
is working greatly
Unfortunately
deal.getInstrument().getName().equalsIgnoreCase(instrumentName)
is not working as expected.Is it possible to map that equaslsIgnoreCase match SQL UPPER (string1) UPPER(string2) or same thing for lower?
The text was updated successfully, but these errors were encountered: