开发者

Problem with JPA, EclipseLink and case sensitive mysql

My application is working fine in a Windows environment, but when I'm trying to test in a linux server, I have a problem with the JPA EclipseLink sql generated. I created all my tables in lower case, but when I look in the logs, I see something like that, all in upper case:

INSERT INTO PFC(ID, ALUMN,PROPOSED_ID) VALUES (?, ?, ?)

mixed with others like this (sequences) in lower case:

INSERT INTO buzonmensajes (mensajeid, buzonid) VALUES (?, ?)
        bind => [27, 1]

and of course, everything goes wrong, server didn't find the uppercase tables, etc..

We use orm.xml to define all the database actions (queries,entities, etc..) and everything it's in lowercase...

I know that there are a Mysql paramater to change these behaviour, but unfortunately I'm not allowed to change it. My problem is that I need to tell to JPA to create all the querys and insert statmets with the table nam开发者_StackOverflowe in lower case


The issue is likely occurring because you are allowing EclipseLink to default some of the names. If you specify the names using the case of your database EclipseLink should use those cases by default.

If you find that is not working you can always enforce case by using delimited identifiers using the '\"' pattern : @Table("\"pfc\"") but this should not be required.

What version of EclipseLink are you using?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜