Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » IntegrityChecker with PostgreSQL
IntegrityChecker with PostgreSQL [message #826543] Thu, 22 March 2012 07:38 Go to next message
Christoph L is currently offline Christoph LFriend
Messages: 8
Registered: January 2012
Junior Member
Environment: EclipseLink 2.3.2, PostgreSQL 9.1 on Windows

I'm trying to use the IntegrityChecker. I registered my session customizer and activated the default IntegrityChecker. It complains about missing tables that in reality exist (I also let EcliseLink generate the schema to verify I didn't do something wrong). I debugged it a bit and found that in IntegrityChecker#initializeTables it uses row.get("TABLE_NAME") to read a table name. But this returns null because in the row the key is "table_name".

Then i used my custom IntegrityChecker which "fixes" this, but there's the same issue with column names. They are checked in ClassDescriptor which isn't so easy to change afaik.

I suspect that IntegrityChecker works but my configuration is somehow broken. The PostgreSQLPlatform is set correctly. Any ideas what I could try?
Re: IntegrityChecker with PostgreSQL [message #826815 is a reply to message #826543] Thu, 22 March 2012 14:44 Go to previous messageGo to next message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1039
Registered: July 2009
Senior Member
Your database returns column names in lower case, which may also cause problems with native queries if your application uses the defaults for column names since they default to upper case. You can try using the persistence property:
"eclipselink.jpa.uppercase-column-names"
To upper case both sides if you also have native query issues, or just
"eclipselink.jdbc.uppercase-columns"
to have column name metadata returned from the driver put int uppercase.

Best Regards,
Chris


Re: IntegrityChecker with PostgreSQL [message #827699 is a reply to message #826815] Fri, 23 March 2012 17:28 Go to previous messageGo to next message
Christoph L is currently offline Christoph LFriend
Messages: 8
Registered: January 2012
Junior Member
Hi Chris,

thanks for your advice. I set both options to true, but unfortunately the keys in "row" are still lowercase. Any other suggestions?
Re: IntegrityChecker with PostgreSQL [message #828104 is a reply to message #827699] Sat, 24 March 2012 07:43 Go to previous message
Christoph L is currently offline Christoph LFriend
Messages: 8
Registered: January 2012
Junior Member
I figured it out. The problem was that I have a entity User where I set @Table(name="user_"). I changed it to @Table(name="USER_") and it's working now.

Thanks for your help!
Previous Topic:EclipseLink JPA: Composite Persistence Units Example
Next Topic:PLSQLStoredProcedureCall Fail to convert to internal representation
Goto Forum:
  


Current Time: Thu Dec 18 10:45:26 GMT 2014

Powered by FUDForum. Page generated in 0.01608 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software