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

Ravi P Palacherla commented on OPENJPA-1083:
--------------------------------------------

Hi Michael,

Thanks a lot for looking into it.

Yes I agree with you, the actual issue is "We're able to create a FK without a 
name but unable to remove one. "

When trying to add FK with out a name then the DB will use a system generated 
name.

There are couple of options that I can think of in fixing the issue:
1)
While trying to remove the FK ( getDropForeignKeySQL ) if there is no foreign 
key name then I will try to get the FK name from DB and use it in the drop FK 
statement.

2)
While adding a constraint, openJPA should give a default name to constraint, 
unless already specified by app or testcase.
In this case we may have to handle the duplicate constraint name on a table 
just like column names.

I will start working on it, unless you have objection with any one of them (or 
both).

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


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

Reply via email to