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

Allow uppercase table names containing reserved substrings like OR AND #765

Closed
chapmandu opened this issue Apr 18, 2017 · 6 comments
Closed

Allow uppercase table names containing reserved substrings like OR AND #765

chapmandu opened this issue Apr 18, 2017 · 6 comments
Labels
bug

Comments

@chapmandu
Copy link
Member

@chapmandu chapmandu commented Apr 18, 2017

Allow the use of table names such as IMPORTS, CATEGORIES and BANDS.

Porting legacy applications to cfwheels often prevents the use of wheels conventions. Databases that are table name case sensitive make workarounds (eg. table("categories") more difficult.

The following code using a table name of CATEGORIES throws an exception as the wheels sql parser is separating statements using OR as a delimiter.

model("category").findAll(where="CATEGORIES.ID = 1");

Wheels looked for the column mapped to the IES.ID property but couldn't find it in the database table. sql.cfm line 424

chapmandu added a commit that referenced this issue Apr 18, 2017
@chapmandu

This comment has been minimized.

@perdjurner

This comment has been minimized.

Copy link
Contributor

@perdjurner perdjurner commented Apr 19, 2017

Is your database case sensitive?

If not, you can use set(lowerCaseTableNames=true) as a work-around I think.

@perdjurner

This comment has been minimized.

Copy link
Contributor

@perdjurner perdjurner commented Apr 19, 2017

Well, after having coffee I now realize that you can ignore my comment above :)

@perdjurner

This comment has been minimized.

Copy link
Contributor

@perdjurner perdjurner commented Feb 5, 2018

Is this happening on 2.0.1 as well?

@chapmandu

This comment has been minimized.

Copy link
Member Author

@chapmandu chapmandu commented Feb 5, 2018

I believe so.. There are commented out failing tests and my colleague has developed a fix. Leave this open and I'll commit.

@perdjurner

This comment has been minimized.

Copy link
Contributor

@perdjurner perdjurner commented Feb 5, 2018

Labeling as bug for now but we may need to simply make a rule that this is not supported and document it.

@perdjurner perdjurner added the bug label Feb 5, 2018
@chapmandu chapmandu closed this in 44b4286 Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.