You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/04/02 10:03:00 UTC

[jira] [Commented] (OPENJPA-1303) Reserved words are not mapped correctly in table definition

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

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

Commit 6861dd1d02751ae55ef64dd51f6808d044dc560d in openjpa's branch refs/heads/master from Mark Struberg
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=6861dd1 ]

OPENJPA-1303 differentiate btw COLUMN and COLUMN_DEF rules

Column names and Column definitions (the types, e.g. VARCHAR(20) ) have
different rules. We now can properly specify both of em.


> Reserved words are not mapped correctly in table definition
> -----------------------------------------------------------
>
>                 Key: OPENJPA-1303
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1303
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: Jeremy Bauer
>            Assignee: Jeremy Bauer
>            Priority: Major
>             Fix For: 3.1.3
>
>
> OpenJPA is not mapping reserved words correctly in some cases.  Particularly, the use of the reserved word/data type "NUMBER" is causing issues when the jUnit suite on Oracle.  The problem is more prevalent when using JDK 5.  Here is an exception and partial stack from one of the failures:
> TestMappedById.testMappedById1  View test details (org.apache.openjpa.persistence.enhance.identity)
>    <openjpa-2.0.0-SNAPSHOT-runknown nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Column, parameter, or variable #4: Cannot find data type OTHER. {stmnt 10310962 CREATE TABLE EMP_MBI (empId INT NOT NULL, empType SMALLINT NOT NULL, PHONENUMBER_PHNUMBER INT, PHONENUMBER_NUMBER OTHER, PRIMARY KEY (empId, empType))} [code=2715, state=S0007]
>    at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:553)
>    at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:453)
>    Please wait... Show stacktrace »
>    « Hide stacktrace
>    <openjpa-2.0.0-SNAPSHOT-runknown nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Column, parameter, or variable #4: Cannot find data type OTHER. {stmnt 10310962 CREATE TABLE EMP_MBI (empId INT NOT NULL, empType SMALLINT NOT NULL, PHONENUMBER_PHNUMBER INT, PHONENUMBER_NUMBER OTHER, PRIMARY KEY (empId, empType))} [code=2715, state=S0007]
>    at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:553)
>    at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:453)
>    at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:158)
>    at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:162)
>    at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:118)
>    at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:201)
>    at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:152)
>    at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:199)
>    at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
>    at org.apache.openjpa.persistence.enhance.identity.TestMappedById.createObj1(TestMappedById.java:191)
>    at org.apache.openjpa.persistence.enhance.identity.TestMappedById.testMappedById1(TestMappedById.java:97)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)