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 Fix - Escape Strings for entity name after JOIN keyword. #3338

Open
wants to merge 6 commits into
base: 5.6
Choose a base branch
from

Conversation

arulsmv
Copy link

@arulsmv arulsmv commented Apr 9, 2020

Thie commit intended for all the organizations having domains ending in "in".
eg musicmaster.in
Since the entity packages names will be starting with "in.*" any of JOIN query fails as "in"
is considered as a keyword.
This fix intended to escape the package names with QUOTE having fully qualified
'class' name of the entity.

    Thie commit intented for all the organizations having domains ending in "in".
            eg musicmaster.in
    Since the entity packages names will be in.* any of JOIN query fails as "in"
    was considered as a keyword.
    This fix intended to escape the package names with QUOATE having fully qualified
    class name of the entity.
Wrong location deleting it
Wrong location deleting it
Grammer change.
PArser change
Copy link
Contributor

@NathanQingyangXu NathanQingyangXu left a comment

Choose a reason for hiding this comment

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

seems a good catch. it would be great to add a testing case to showcase your code change fixed the issue. creating a new JIRA ticket would be desirable as well.

@arulsmv
Copy link
Author

arulsmv commented Apr 9, 2020

seems a good catch. it would be great to add a testing case to showcase your code change fixed the issue. creating a new JIRA ticket would be desirable as well.

Thanks, Nathan Xu for the quick review.

Will add the test cases Since this is my first opensource pull request not sure about the process followed here.
if you can share me quick checklist will follow it
Created the case https://hibernate.atlassian.net/browse/HHH-13943

Adding test cases.
@NathanQingyangXu
Copy link
Contributor

https://hibernate.atlassian.net/browse/HHH-13943

Thanks for the testing case. As a matter of fact, I am a community contributor just like you. Seems decent testing cases added. Hopefully some team member can review your PR, but please be patient for they are busy with v6 developing right now.

@arulsmv
Copy link
Author

arulsmv commented Apr 10, 2020

https://hibernate.atlassian.net/browse/HHH-13943

Thanks for the testing case. As a matter of fact, I am a community contributor just like you. >Seems decent testing cases added. Hopefully some team member can review your PR, but >please be patient for they are busy with v6 developing right now.

Thank you, hope it will be pulled soon.

@arulsmv
Copy link
Author

arulsmv commented Apr 23, 2020

Can anyone review this, please?
I have another/similar fix for from query with COMMA

@nealeu
Copy link

nealeu commented Jan 6, 2021

@sebersole What gives with such a long delay?

@gbadner
Copy link
Contributor

gbadner commented Jan 6, 2021

@arulsmv, IIUC, your fix requires the application to put quotes around the package name to get around this bug. Is that correct? If that is correct, then I don't think this is the correct fix. From your test, it looks like the same issue does not exist after {{FROM}} with a package name starts with "in." after {{FROM}}. IMO, the bug should be fixed in Hibernate, without requiring the application to put quotes around the package name.

@arulsmv, please confirm if I am understanding your proposed fix correctly. I have not had a chance to really dig into this, so I could be missing something.

Base automatically changed from master to main March 19, 2021 16:00
@hibernate-github-bot
Copy link

Thanks for your pull request!

This pull request does not follow the contribution rules. Could you have a look?

❌ All commit messages should start with a JIRA issue key matching pattern HHH-\d+
    ↳ Offending commits: [5291880, 0590096, d7597ee, 14862d6, 666cf01, 450dca0]

› This message was automatically generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants