You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Fay Wang (JIRA)" <ji...@apache.org> on 2008/11/26 20:16:44 UTC

[jira] Created: (OPENJPA-793) Embeddables does not work properly with duplicate persistent field names

Embeddables does not work properly with duplicate persistent field names
------------------------------------------------------------------------

                 Key: OPENJPA-793
                 URL: https://issues.apache.org/jira/browse/OPENJPA-793
             Project: OpenJPA
          Issue Type: Bug
            Reporter: Fay Wang


If an embeddable has the same persistent field names as its owning class, or two embeddables contains the same field names and both are embedded in an entity class, openjpa will not work properly due to the column name clashes. The fix is for openjpa to detect these situations and throw an exception and for the application to use @AttributeOverride to specify unique column names for the persistent fields in the embeddable.

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


[jira] Updated: (OPENJPA-793) Embeddables does not work properly with duplicate persistent field names

Posted by "Fay Wang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-793?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fay Wang updated OPENJPA-793:
-----------------------------

    Attachment: openjpa-793.patch

A testcase will be provided soon.

> Embeddables does not work properly with duplicate persistent field names
> ------------------------------------------------------------------------
>
>                 Key: OPENJPA-793
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-793
>             Project: OpenJPA
>          Issue Type: Bug
>            Reporter: Fay Wang
>         Attachments: openjpa-793.patch
>
>
> If an embeddable has the same persistent field names as its owning class, or two embeddables contains the same field names and both are embedded in an entity class, openjpa will not work properly due to the column name clashes. The fix is for openjpa to detect these situations and throw an exception and for the application to use @AttributeOverride to specify unique column names for the persistent fields in the embeddable.

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


[jira] Updated: (OPENJPA-793) Embeddables does not work properly with duplicate persistent field names

Posted by "Fay Wang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-793?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fay Wang updated OPENJPA-793:
-----------------------------

    Affects Version/s: 2.1.0

> Embeddables does not work properly with duplicate persistent field names
> ------------------------------------------------------------------------
>
>                 Key: OPENJPA-793
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-793
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.1.0
>            Reporter: Fay Wang
>            Assignee: Fay Wang
>         Attachments: openjpa-793-1.patch, openjpa-793-3.patch, openjpa-793-testcase.patch, openjpa-793.patch
>
>
> If an embeddable has the same persistent field names as its owning class, or two embeddables contains the same field names and both are embedded in an entity class, openjpa will not work properly due to the column name clashes. The fix is for openjpa to detect these situations and throw an exception and for the application to use @AttributeOverride to specify unique column names for the persistent fields in the embeddable.

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


[jira] Updated: (OPENJPA-793) Embeddables does not work properly with duplicate persistent field names

Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-793?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Donald Woods updated OPENJPA-793:
---------------------------------

    Affects Version/s:     (was: 2.1.0)
                       2.0.0-M2
        Fix Version/s: 2.1.0

> Embeddables does not work properly with duplicate persistent field names
> ------------------------------------------------------------------------
>
>                 Key: OPENJPA-793
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-793
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.0.0-M2
>            Reporter: Fay Wang
>            Assignee: Fay Wang
>             Fix For: 2.1.0
>
>         Attachments: openjpa-793-1.patch, openjpa-793-3.patch, openjpa-793-testcase.patch, openjpa-793.patch
>
>
> If an embeddable has the same persistent field names as its owning class, or two embeddables contains the same field names and both are embedded in an entity class, openjpa will not work properly due to the column name clashes. The fix is for openjpa to detect these situations and throw an exception and for the application to use @AttributeOverride to specify unique column names for the persistent fields in the embeddable.

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


[jira] Updated: (OPENJPA-793) Embeddables does not work properly with duplicate persistent field names

Posted by "Fay Wang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-793?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fay Wang updated OPENJPA-793:
-----------------------------

    Attachment: openjpa-793-testcase.patch

> Embeddables does not work properly with duplicate persistent field names
> ------------------------------------------------------------------------
>
>                 Key: OPENJPA-793
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-793
>             Project: OpenJPA
>          Issue Type: Bug
>            Reporter: Fay Wang
>         Attachments: openjpa-793-1.patch, openjpa-793-3.patch, openjpa-793-testcase.patch, openjpa-793.patch
>
>
> If an embeddable has the same persistent field names as its owning class, or two embeddables contains the same field names and both are embedded in an entity class, openjpa will not work properly due to the column name clashes. The fix is for openjpa to detect these situations and throw an exception and for the application to use @AttributeOverride to specify unique column names for the persistent fields in the embeddable.

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


[jira] Assigned: (OPENJPA-793) Embeddables does not work properly with duplicate persistent field names

Posted by "Fay Wang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-793?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fay Wang reassigned OPENJPA-793:
--------------------------------

    Assignee: Fay Wang

> Embeddables does not work properly with duplicate persistent field names
> ------------------------------------------------------------------------
>
>                 Key: OPENJPA-793
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-793
>             Project: OpenJPA
>          Issue Type: Bug
>            Reporter: Fay Wang
>            Assignee: Fay Wang
>         Attachments: openjpa-793-1.patch, openjpa-793-3.patch, openjpa-793-testcase.patch, openjpa-793.patch
>
>
> If an embeddable has the same persistent field names as its owning class, or two embeddables contains the same field names and both are embedded in an entity class, openjpa will not work properly due to the column name clashes. The fix is for openjpa to detect these situations and throw an exception and for the application to use @AttributeOverride to specify unique column names for the persistent fields in the embeddable.

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


[jira] Updated: (OPENJPA-793) Embeddables does not work properly with duplicate persistent field names

Posted by "Fay Wang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-793?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fay Wang updated OPENJPA-793:
-----------------------------

    Attachment: openjpa-793-1.patch

> Embeddables does not work properly with duplicate persistent field names
> ------------------------------------------------------------------------
>
>                 Key: OPENJPA-793
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-793
>             Project: OpenJPA
>          Issue Type: Bug
>            Reporter: Fay Wang
>         Attachments: openjpa-793-1.patch, openjpa-793.patch
>
>
> If an embeddable has the same persistent field names as its owning class, or two embeddables contains the same field names and both are embedded in an entity class, openjpa will not work properly due to the column name clashes. The fix is for openjpa to detect these situations and throw an exception and for the application to use @AttributeOverride to specify unique column names for the persistent fields in the embeddable.

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


[jira] Updated: (OPENJPA-793) Embeddables does not work properly with duplicate persistent field names

Posted by "Fay Wang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-793?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fay Wang updated OPENJPA-793:
-----------------------------

    Attachment: openjpa-793-3.patch

The logic to detect duplicate names in the embeddable is moved from EmbedFieldStrategy to MappingRepository because openjpa  does not have complete informatioin about the metadata when EmbedFieldStrategy.map is called. We need to wait until the meta data is processed completely to detect if there is any duplicate field names in the embeddables (the same field name as some field in its owning class, the same field name as some field in its own nested embeddable, the same field name as some field in its sister embeddable contained in the same owning entity class). 

> Embeddables does not work properly with duplicate persistent field names
> ------------------------------------------------------------------------
>
>                 Key: OPENJPA-793
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-793
>             Project: OpenJPA
>          Issue Type: Bug
>            Reporter: Fay Wang
>         Attachments: openjpa-793-1.patch, openjpa-793-3.patch, openjpa-793-testcase.patch, openjpa-793.patch
>
>
> If an embeddable has the same persistent field names as its owning class, or two embeddables contains the same field names and both are embedded in an entity class, openjpa will not work properly due to the column name clashes. The fix is for openjpa to detect these situations and throw an exception and for the application to use @AttributeOverride to specify unique column names for the persistent fields in the embeddable.

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