Hi,

To be more precise, it is not DBIdentifier#setName but the
Normalizer#normalizer that is static:

https://github.com/apache/openjpa/blob/ffe3fe4a5051632d15973a0084767612ab22ad17/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/identifier/Normalizer.java#L33
------------------------------------
public class Normalizer {

    private static IdentifierUtil normalizer =
            new DBIdentifierUtilImpl(new DefaultIdentifierConfiguration());
    
    private static IdentifierRule defaultRule;
    
    static {
        defaultRule =
normalizer.getIdentifierConfiguration().getDefaultIdentifierRule();
    }

    ....

    public static String delimit(String name, boolean force) {
        return normalizer.delimit(defaultRule, name, force);
    }
------------------------------------

And as you can see the Normalizer#delimit method use the static
IdentifierUtil which is configured with the DefaultIdentifierConfiguration.
It does not take into account the dictionary.

So when you call something like DBIdentifier.newSchema("My-schema"), it
always use DefaultIdentifierConfiguration to delimit identifier.

Regards,
Yves



--
Sent from: http://openjpa.208410.n2.nabble.com/OpenJPA-Developers-f210739.html

Reply via email to