Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Problem with @Table(name = "\"TableName\"") #140

Kozzi11 opened this Issue · 7 comments

3 participants

Daniel Kozak Hasan Ceylan Jaroslav Kroft
Daniel Kozak

When I use Table annotation:
@Table(name = "\"TableName\"")

BatooJPA use in MySQL query "TableName" instead of TableName

Hasan Ceylan

BatooJPA does not sanitize the name of the table. Why do you put the quotation marks around the name?

Daniel Kozak

Because I make some benchmark of different JPA providers, and try to have same source for all of them. And BatooJPA is the only one, which has this issue.

Daniel Kozak

However removing quotation marks, seems to work ok, but still I am interesting why others JPA providers works well with quotation marks.

Hasan Ceylan

That is an interesting point. As I said earlier, BatooJPA does NOT sanitize the table names. Obviously others do.

Out of curiosity why do you need the quotes? If there's a use case we certainly may implement a DB specific sanitizing processor.

Daniel Kozak

I found out, I really don't need them. First I have only
class TableName ...
But with Eclipse(Top)Link I get errors, because it change TableName to TABLENAME, so after searching I find that I can write @Table(name = "\"TableName\""), and with this everything works OK, until I try BatooJPA, but with @Table(name = "TableName") works all JPA providers, which I already try

Hasan Ceylan

OK still do not understand with Eclipselink does not work with TableName. However I'll keep the issue open for further investigation to be inline with other providers.

Jaroslav Kroft

As I understand, the quotation should be replace by JPA provider to the database delimiters for long identifier / case sensitive / reserved word (for example for MSSQL something like [...] or '...').

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.