Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » JPA database schema validation case problems in ClassDescriptor#checkDatabase(...)(ClassDescriptor#checkDatabase(...): field.getName() vs. field.getNameForComparisons())
JPA database schema validation case problems in ClassDescriptor#checkDatabase(...) [message #1058520] Tue, 14 May 2013 11:53 Go to next message
Bernhard M is currently offline Bernhard MFriend
Messages: 1
Registered: May 2013
Junior Member
Hi all,

After migrating to EclipseLink (currently 2.5.0-M6) from Hibernate, I'm trying to get database schema validation to work (again) for my PostgreSQL database.

After some problems, I arrived at an almost working solution by setting 'eclipselink.jpa.uppercase-column-names' to 'true', which validates all tables.
However, when validating fields, ClassDescriptor#checkDatabase(AbstractSession) fails on line #953 because the check 'databaseFields.contains(field.getName())' fails because 'databaseFields' contains all-uppercase field names (as expected) but 'field.getName()' gives a lowercase name.

Can anybody explain why this is? Or even better, why the comparison doesn't look like 'databaseFields.contains(field.getNameForComparisons())' (i.e. uses the "name for comparisons" which indeed is all uppercase)?


Re: JPA database schema validation case problems in ClassDescriptor#checkDatabase(...) [message #1058581 is a reply to message #1058520] Tue, 14 May 2013 13:54 Go to previous message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1300
Registered: July 2009
Senior Member
Please file a bug as I believe it should be using the getNameForComparisons() method. The only workaround I can think of is to define the field using uppercase in the mappings.

Best Regards,
Previous Topic: create a function via nativeQuery
Next Topic:[Moxy] How to use dynamic Moxy for specific example
Goto Forum:

Current Time: Sun Jun 24 23:00:29 GMT 2018

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

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

Back to the top