[ 
https://issues.apache.org/jira/browse/OPENJPA-3075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18142849#comment-18142849
 ] 

ASF subversion and git services commented on OPENJPA-3075:
----------------------------------------------------------

Commit 0cf577c60d66b1429989e1fe6e45ef522b2cf6a7 in openjpa's branch 
refs/heads/OPENJPA-3075 from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=0cf577c60 ]

[OPENJPA-3075] Make the JPA default table names valid that Derby rejects

The JPA mapping defaults take the table name from the entity name, and the
join and collection table names from it, without consulting the dictionary,
so an entity named Window, Order or User gave a CREATE TABLE Derby rejects.

A dictionary now knows the words its database rejects as unquoted table names,
and only a default table name that is one of these words, and not delimited, is
made valid the way the dictionary makes its generated names valid, without
making it unique so that the same name is derived when the table exists. For
Derby these are the words it rejects as unquoted column names, which were
measured to be the same; other dictionaries have no such words, so their
default table names do not change, and reserved words Derby accepts as table
names, such as ACTION or COUNT, are kept as well.


>  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
>            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)

Reply via email to