You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Milosz Tylenda (JIRA)" <ji...@apache.org> on 2010/01/10 10:45:56 UTC
[jira] Commented: (OPENJPA-1455) SynchronizeMapping ALTER TABLE ADD
COLUMN fails with column already exist exception
[ https://issues.apache.org/jira/browse/OPENJPA-1455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798456#action_12798456 ]
Milosz Tylenda commented on OPENJPA-1455:
-----------------------------------------
Hi Fay, I have a few concerns with the committed code:
1. Do schema generation and other things work if you specify DB2 JDBC URL property currentSchema=my_schema? Does metaData.getUserName() return "my_schema" in this case?
2. If the above is false, have you considered issuing "VALUES CURRENT SCHEMA" query instead of calling "metaData.getUserName()"?
In other words, I am afraid that the current schema not always equals user name with DB2 (and maybe some other databases also) and whether by fixing this issue we are creating another one.
> SynchronizeMapping ALTER TABLE ADD COLUMN fails with column already exist exception
> -----------------------------------------------------------------------------------
>
> Key: OPENJPA-1455
> URL: https://issues.apache.org/jira/browse/OPENJPA-1455
> Project: OpenJPA
> Issue Type: Bug
> Components: jdbc
> Affects Versions: 2.0.0
> Reporter: Fay Wang
> Assignee: Fay Wang
> Fix For: 2.0.0
>
>
> SynchronizeMapping ALTER TABLE ADD COLUMN fails with column already exist exception. The failure happens when there are multiple tables with the same name but in different schema. When OpenJPA detects a missing column from one table with schema X, it tried to to add the column to another table in default schema, resulting in column already exist exception.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.