openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ravi P Palacherla (JIRA)" <j...@apache.org>
Subject [jira] Updated: (OPENJPA-1083) org.apache.openjpa.persistence.kernel.TestEJBState fails with two exceptions ORA-00904 and ORA-02275 against oracleDB.
Date Fri, 22 May 2009 14:12:46 GMT

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

Ravi P Palacherla updated OPENJPA-1083:
---------------------------------------

    Attachment: OPENJPA-1083_option2.patch
                OPENJPA-1083_option1.patch

Hi Michael, 

option#1 and option#2 patches are uploaded.
You do not need both patches, either one of them should work.

TestEJBState will work only with patch OPENJPA-946 and the current patch.
My current patch handles the foreign key problem.

option#1 :
Every time I try to delete a FK, I will check the FKname.
If it does not exist then I go to DB and fetch the FKName.

If option#1 is not preferable for any reason then you can try option2.

option#2 :
Every time I try to add a FK. 
I will check in the Mappings if FKName exists.
If it does not exist then a default name will be given.
The default name is local table name + column name of FK.

The only issue with option#2 is that it will work on a new clean database.
So running "mvn clean test -DfailIfNoTests=false" will run fine with out any issues.

If the tables are already created then it will not work because openJPA will think that the
default name FK 
is new FK and will try to add the existing FK with the new default name.

I think it is an existing issue, same behavior for columns , tables etc...

Please let me know if option#2 is preferable, but my changes are not acceptable because it
does not work with existing database. I can add the logic of making it work on existing database
also.

Regards,
Ravi.

> org.apache.openjpa.persistence.kernel.TestEJBState fails with two exceptions ORA-00904
and ORA-02275 against oracleDB.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1083
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1083
>             Project: OpenJPA
>          Issue Type: Sub-task
>    Affects Versions: 2.0.0
>            Reporter: Ravi P Palacherla
>            Assignee: Michael Dick
>         Attachments: OPENJPA-1083.patch, OPENJPA-1083_option1.patch, OPENJPA-1083_option2.patch
>
>


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


Mime
View raw message