[ 
https://issues.apache.org/jira/browse/OPENJPA-2022?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Zwolak updated OPENJPA-2022:
----------------------------------

    Attachment: OPENJPA-2022-trunk.patch

This patch fixed the problem for me.  Based on the comments in this issue, I 
think my problem is the same as the original issue reported, but I cannot test 
for the original reporter.

The problem is on line 695 of org.apache.openjpa.jdbc.schema.SchemaGenerator

which starts the primary key generation and looks like
schemaName = DBIdentifier.trimToNull(schemaName);

But should look more like the code for indices (line 760) and foreign keys:
schemaName = DBIdentifier.trimToNull(idxs[i].getSchemaIdentifier());

> Reversemappingtooltask with oracle is failing like in OPENJPA-1940 previous 
> bug
> -------------------------------------------------------------------------------
>
>                 Key: OPENJPA-2022
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2022
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: tooling
>    Affects Versions: 2.1.0, 2.1.1, 2.2.0
>         Environment: Woking on a windows pc with a oracle 10g express 
> database, eclipse helios, using oracle 11.2.0.2 driver. 
>            Reporter: sebastien morissette
>            Assignee: Michael Dick
>             Fix For: 2.4.0
>
>         Attachments: OPENJPA-2022-trunk.patch
>
>
> When running either of the versions of the reversemappingtool as reported in 
> the 1940 bug as fixed, i get the same error as in 2.1.0 :
> [reversemappingtool] 2363  openjpa  INFO   [main] openjpa.Tool - 
> ReverseMappingTool : generating classes.
> [reversemappingtool] 2365  openjpa  INFO   [main] openjpa.MetaData - Table 
> "RMTOOLS."AppUsers"" could not be reverse mapped.  This means that the table 
> does not have a primary key (primary keys are required to establish unique 
> identifiers for all persistent objects) and does not match a known pattern 
> for a table used for cross-reference or value collections.
> [reversemappingtool] 2366  openjpa  INFO   [main] openjpa.MetaData - Table 
> "RMTOOLS."CredentialTypes"" could not be reverse mapped.  This means that the 
> table does not have a primary key (primary keys are required to establish 
> unique identifiers for all persistent objects) and does not match a known 
> pattern for a table used for cross-reference or value collections.
> [reversemappingtool] 2366  openjpa  INFO   [main] openjpa.MetaData - Table 
> "RMTOOLS."Credentials"" could not be reverse mapped.  This means that the 
> table does not have a primary key (primary keys are required to establish 
> unique identifiers for all persistent objects) and does not match a known 
> pattern for a table used for cross-reference or value collections.
> this happens for all my tables. Is it possible this bug was reintroduced?
> thanks



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to