You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Jacek Laskowski (JIRA)" <ji...@apache.org> on 2007/04/19 17:27:15 UTC

[jira] Commented: (OPENJPA-224) columnDefinition on @Column doesn't work

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

Jacek Laskowski commented on OPENJPA-224:
-----------------------------------------

What database do you use? I ran a test case with an entity annotated with @Column(name = "C_APPLICATION_NUMBER", columnDefinition="nvarchar(250)") and guess what I'd got:

Tests run: 3, Failures: 1, Errors: 0, Skipped: 2, Time elapsed: 4.062 sec <<< FAILURE!
setUp(pl.jaceklaskowski.jpa.issue.ATest)  Time elapsed: 0 sec  <<< FAILURE!
<0.9.8-incubating-SNAPSHOT nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Feature not implemented: NATIONAL CHAR VARYING. {stmnt 19762893 CREATE TABLE
 A (id BIGINT NOT NULL, C_APPLICATION_NUMBER nvarchar(250), col2 VARCHAR(4), PRIMARY KEY (id))} [code=30000, state=0A000]
        at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:543)
        at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:443)
        at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:167)
        at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:127)
        at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:171)
        at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:139)
        at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:187)
        at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:140)
        at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:52)
        at pl.jaceklaskowski.jpa.BaseTest.setUp(BaseTest.java:37)
...

It works with OpenJPA 0.9.8-incubating-SNAPSHOT and Derby that doesn't support nvarchar (I think some db dictionary translation is involved here so the type of DB is important to note).

Could you give 0.9.8-incubator-SNAPSHOT a shot? You'll need to build it from the sources.

> columnDefinition on @Column doesn't work
> ----------------------------------------
>
>                 Key: OPENJPA-224
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-224
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 0.9.6
>            Reporter: Daniel Gajdos
>
> I tried to specify @Column(name = "C_APPLICATION_NUMBER", columnDefinition="nvarchar(250)") but it still generates C_APPLICATION_NUMBER VARCHAR2(255) as column declaration. I need to user NVARCHAR2(250) to support national charset. Any idea why it doesn't work?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.