[
https://issues.apache.org/jira/browse/OPENJPA-3075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18143806#comment-18143806
]
ASF subversion and git services commented on OPENJPA-3075:
----------------------------------------------------------
Commit 04b97759f8e033bcd558cb71bf3cb90b6df894ab in openjpa's branch
refs/heads/OPENJPA-3007 from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=04b97759f ]
[OPENJPA-3076] Decide per dictionary whether reserved words are delimited, not
JVM-wide (#304)
* [OPENJPA-3076] Add a test utility that records the names the mapping of a set
of entities gets for a dictionary
* [OPENJPA-3076] Decide per dictionary whether a reserved word is delimited,
rather than with the identifier rule all dictionaries of the JVM share
* [OPENJPA-3076] Test that persistence units for different databases in one JVM
get the names they get alone, and stop resetting the shared identifier rule
after the tests
* [OPENJPA-3076] Describe in the migration considerations and the release notes
that the delimiting of reserved words is decided per dictionary
* [OPENJPA-3076] Do not delimit a reserved word in a name that is written
without delimiters, such as the name the database metadata is asked for
* [OPENJPA-3076] Record the names the database metadata is asked for in the
name dump
* [OPENJPA-3076] Name the sequences, columns and constraints of a schema file
for the dictionary, as its schemas and tables
* [OPENJPA-3076] Remember the names a dictionary that delimits reserved words
gave, and take the base name of a qualified name without copying it, as the
names written into SQL are normalized again
* [OPENJPA-3076] Test how a dictionary normalizes qualified names, constants
and column definitions
* [OPENJPA-3076] Name the configured schema, the default schema of the
persistence unit and the given table of a mapping for the dictionary
* [OPENJPA-3076] Test that persistence units for different databases mapped by
different threads at the same time get the names they get alone
* [OPENJPA-3076] Do not normalize the placeholder table name of a unique
constraint, and describe how a naming utility without a dictionary normalizes
* [OPENJPA-3076] Use the renamed compatibility option UpdatedReservedWords
* [OPENJPA-3076] Expect the Derby names of OPENJPA-3075 and test every name
dump setup next to all others
Since OPENJPA-3075 the Derby dictionary reserves WINDOW and renames a default
table name Derby rejects, so Window becomes WINDOW0 on Derby whichever
dictionary is configured first. The per dictionary tests now use RANK and
Partition, which MySQL reserves and Derby does not, for a name MySQL delimits
and Derby leaves alone, and expect WINDOW0 on Derby. A new test maps every
setup of the name dump after the dictionaries of all setups were configured,
in either order, and compares the names with those the setup gets alone.
---------
Co-authored-by: Maxim Solodovnik <[email protected]>
> DerbyDictionary does not know WINDOW and other words Derby reserves
> --------------------------------------------------------------------
>
> Key: OPENJPA-3075
> URL: https://issues.apache.org/jira/browse/OPENJPA-3075
> Project: OpenJPA
> Issue Type: Bug
> Reporter: Richard Zowalla
> Assignee: Richard Zowalla
> Priority: Major
> Fix For: 4.2.0
>
>
> DerbyDictionary's reserved words are missing words that Derby rejects as
> unquoted identifiers, such as WINDOW. An entity named Window therefore
> produces CREATE TABLE Window, which fails on Derby. Add the missing words,
> taken from Derby itself.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)