I'm upgrading from DataNucleus 1.1.0m4 (yes, I know it is old) to the current 3.0.6 release.
I replaced the jar files and tweaked a few package names. Everything compiled and the bytecode enhancement didn't fail, so I thought it was going to be an easy upgrade.
However, when I tried to use SchemaTool to recreate the unit testing database, the insertion of sample data wasn't working. After much confusion, I noticed that two versions of each table existed: the previous ones created by 1.1.0m4 SchemaTool, which had lower case names (the PostgreSQL standard) and ones where the names were capitalized, which were created by 3.0.6 SchemaTool. When using SchemaTool, I set the "datanucleus.identifier.case" property to LowerCase.
I tweaked SchemaTool to output the DDL. I noticed that the DDL produced by 1.1.0m4 put the table names in lower case, and without double quotes. This is the behavior I expected, considering I set the datanucleus.identifier.case property. The DDL produced by 3.0.6 had the table names capitalized AND inside of double quotes, which explains why it created tables with capitalized names.
Attached to this issue is the DDL produced by 1.1.0m4, 3.0.6, and the XML fragment within my Ant file that uses SchemaTool.
It seems to me that 3.0.6 is not honoring the datanucleus.identifier.case property the way it should. I tried using UpperCase and PreserveCase, and they both produced the same DDL with capitalized table names within quotes. I also tried using the datanucleus1 identifier factory, and it too produced DDL that was capitalized and within quotes.
I tried to debug the issue but didn't get very far. In the SchemaTool.java file around line 533 there is an array of properties specified via system properties, and I noticed that datanucleus.identifier.case was not there, so I was hoping it was an oversight. However, I looked at the 1.1.0 version and it's not there either. I also looked through classes like MappedStoreManager, IdentifierFactory, and DN2IdentifierFactory. It looks like they are all trying to handle the case requested by the user.
My best very uneducated guess is that the "plumbing" is all there, but somewhere along the way the value of the datanucleus.identifier.case property as set by the user is being dropped or lost, so the identifier factories use the default strategy.
Is this truly a bug or did I miss a change in the configuration? I can't see any changes in the SchemaTool documentation that's on the web.