Handle case-sensitive databases - inappropriate change of field case to uppercase ---------------------------------------------------------------------------------
Key: OPENJPA-178 URL: https://issues.apache.org/jira/browse/OPENJPA-178 Project: OpenJPA Issue Type: Bug Components: jdbc Affects Versions: 0.9.6 Environment: Windows, Microsoft SQL Server 2000 and any other case-sensitive database Reporter: Sudheer Ghanathe @Id() @GeneratedValue(strategy=GenerationType.TABLE, generator="ReferenceGen") @TableGenerator(name="ReferenceGen", table="sequencer", pkColumnName="SequencerID", valueColumnName="keyid",pkColumnValue="reference",schema="dbo",allocationSize=1) @Column(name="referenceID", unique=true, nullable=false, precision=10) public Integer getReferenceId() { return this.referenceId; } public void setReferenceId(Integer referenceId) { this.referenceId = referenceId; } The select statement generated in the above primary key generation has inappropriate uppercase for SEQUENCERID, it should have been left as SequencerID. This causes the select to fail which in turn causes the generatedvalue to fail. Resolution: Change the following method in the class org.apache.openjpa.jdbc.sql.DBDictionary.java as follows protected String makeNameValid(String name, NameSet set, int maxLen, int nameType) { ..... ..... return name; //return name.toUpperCase(); } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.