You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Jody Grassel (JIRA)" <ji...@apache.org> on 2009/05/05 20:28:30 UTC

[jira] Created: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
-------------------------------------------------------------------------------------------------------------

                 Key: OPENJPA-1061
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
             Project: OpenJPA
          Issue Type: Bug
          Components: jpa
    Affects Versions: 1.2.1, 1.2.0
            Reporter: Jody Grassel
            Assignee: Jody Grassel
         Attachments: unitttest.patch

When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Commented: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

Posted by "Fay Wang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12706488#action_12706488 ] 

Fay Wang commented on OPENJPA-1061:
-----------------------------------

hi Jody, the patch looks fine to me. ClassMetaData.resolveMeta can potentially modify _embedded field on the condition that the class meta data being resolved is actually "embedded" inside some other entity/embeddable. In other words, it has "owner". In the MSC case, one can not at the same time inherit from MSC and also embed an MSC when this MSC declares an Id field. As to the method isEmbeddableOnly, the _embedded field will not be set again in this method if it is already set. As you pointed out, in the case of MSC, this field is already set during the annotation/xml parsing time.

> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Jody Grassel
>         Attachments: PCEnhancer.patch, unitttest.patch
>
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Updated: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

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

Jody Grassel updated OPENJPA-1061:
----------------------------------

    Attachment:     (was: OpenJPA-1061_1.2.x.patch)

> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Michael Dick
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Updated: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

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

Jody Grassel updated OPENJPA-1061:
----------------------------------

    Attachment: OpenJPA-1061_1.2.x.patch

Formatting cleanup.

> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Michael Dick
>         Attachments: OpenJPA-1061_1.2.x.patch
>
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Updated: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

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

Donald Woods updated OPENJPA-1061:
----------------------------------

    Fix Version/s:     (was: 2.0.0)
                   2.0.0-M3

> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Michael Dick
>             Fix For: 1.2.2, 1.3.0, 2.0.0-M3
>
>         Attachments: OpenJPA-1061_1.2.x.patch, OpenJPA-JIRA1061-packagerefactor-1.2.x.patch, OpenJPA-JIRA1061-packagerefactor-trunk.patch, OpenJPA-JIRA1061_1166-packagerefactor-1.2.x.patch
>
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Updated: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

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

Jody Grassel updated OPENJPA-1061:
----------------------------------

    Attachment:     (was: OpenJPA-1061_main_1.2.x.patch)

> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Michael Dick
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Updated: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

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

Jody Grassel updated OPENJPA-1061:
----------------------------------

    Attachment: OpenJPA-1061_1.2.x.patch

Thanks for the advise.   I migrated the ClassMetaData.isAbstract()/setAbstract() methods from trunk to the 1.2.x release, and modified my patch to use those methods instead of isEmbeddable(); I'm much more content with that approach as it removes any chance that the added logic to addPCMethods() will trigger on anything else other then a MappedSuperclass.

I also found it curious to hear that the unit tests pass with the trunk build -- perhaps there has been a change in processing given all the additional embeddable support provided by JPA 2.0.  It would still be good to bring the unit tests to trunk, extra testing never hurts. :)

I've attached a new patch which migrates and utilizes the ClassMetaData.[is|set]Abstract() methods to this JIRA.

> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Jody Grassel
>         Attachments: OpenJPA-1061_1.2.x.patch, PCEnhancer.patch, unitttest.patch
>
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Updated: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

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

Jody Grassel updated OPENJPA-1061:
----------------------------------

    Attachment: OpenJPA-JIRA1061-packagerefactor-1.2.x.patch

Refactored packaging for the tests for the 1.2.x branch.

> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Michael Dick
>             Fix For: 1.2.2, 1.3.0, 2.0.0
>
>         Attachments: OpenJPA-1061_1.2.x.patch, OpenJPA-JIRA1061-packagerefactor-1.2.x.patch, OpenJPA-JIRA1061-packagerefactor-trunk.patch
>
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Updated: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

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

Jody Grassel updated OPENJPA-1061:
----------------------------------

    Attachment: OpenJPA-1061_1.2.x.patch

Combined fix and junit together.

> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Michael Dick
>         Attachments: OpenJPA-1061_1.2.x.patch, OpenJPA-1061_main_1.2.x.patch, OpenJPA-1061_test_1.2.x.patch
>
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Updated: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

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

Jody Grassel updated OPENJPA-1061:
----------------------------------

    Attachment:     (was: OpenJPA-1061_test_1.2.x.patch)

> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Michael Dick
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Assigned: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

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

Michael Dick reassigned OPENJPA-1061:
-------------------------------------

    Assignee: Michael Dick  (was: Jody Grassel)

> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Michael Dick
>         Attachments: OpenJPA-1061_1.2.x.patch, PCEnhancer.patch, unitttest.patch
>
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Commented: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

Posted by "Pinaki Poddar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12706264#action_12706264 ] 

Pinaki Poddar commented on OPENJPA-1061:
----------------------------------------

I have added a new method ClassMetaData.isAbstract() which affirms (in JPA context) for MappedSuperclass. This method may help to identify whether a type is MSC. 

> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Jody Grassel
>         Attachments: PCEnhancer.patch, unitttest.patch
>
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Updated: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

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

Jody Grassel updated OPENJPA-1061:
----------------------------------

    Attachment: OpenJPA-JIRA1061-packagerefactor-trunk.patch

Shortened the package names and tuned the entity class names used by the test case for OPENJPA-1061.  This patch is intended for trunk.  A patch for 1.2.x is coming shortly.

> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Michael Dick
>             Fix For: 1.2.2, 1.3.0, 2.0.0
>
>         Attachments: OpenJPA-1061_1.2.x.patch, OpenJPA-JIRA1061-packagerefactor-trunk.patch
>
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Updated: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

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

Jody Grassel updated OPENJPA-1061:
----------------------------------

    Attachment: unitttest.patch

Unit test that demonstrates the problem.

> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Jody Grassel
>         Attachments: unitttest.patch
>
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Commented: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

Posted by "Jody Grassel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12706137#action_12706137 ] 

Jody Grassel commented on OPENJPA-1061:
---------------------------------------

What seems to be happening is that during entity enhancement, the MSC type acquires an ObjectIDType.  When the enhancer reaches the entity types extending the MSC, the if-block:

if (_meta.getIdentityType() == ClassMetaData.ID_APPLICATION
            && (_meta.getPCSuperclass() == null || getCreateSubclass() ||
                _meta.getObjectIdType() !=
                    _meta.getPCSuperclassMetaData().getObjectIdType())) {

compares the entity type's ObjectIDType with its MSC, finds they are equivalent, so the entity enhancement does not add the app-id methods; the leaf entity types defer to the MSC's app-id methods.  So when a new entity is being inserted into the persistence context, its initial ObjectID has the MSC in its type field, instead of the leaf entity type.  If another entity extending from the same MSC has the same PK-value, OpenJPAId's implentation of equals() will think it is equivalent, failing the checkForDuplicateId() check.

I've included a potential fix for the above issue.  It adds an additional check, looking for PKFields that are defined by a MSC.  If it finds such PKFields, it walks up the inheritance tree, stopping at either the MSC defining the PKField, or at an entity type (to avoid breaking entity inheritance mechanisms).  Stopping at the MSC defining the PKField qualifies the entity type for app-id method inclusion during enhancement.  This way, the leaf entities use their own pcNewObjectIdInstance() methods (with the appropriate type coded into the method) instead of relying on the mapped superclass's version of the method.

However, there is a degree of uncertainty I have with the fix.  While it fixes the described problem, and it does not fail any of the existing JUnit tests, I rely on the ClassMetaData.isEmbeddedOnly() method to determine if a type is a MSC or a genuine entity.  From what I could tell, the ClassMetaData.setEmbeddedOnly() method is called only during annotation and ORL XML metadata processing (it is set explicitly false for MappedSuperClass types).  However, the methods ClassMetaData.isEmbeddedOnly() and ClassMetaData.resolveMeta() are capable of mutating the ClassMetaData._embedded field; so there needs to be verification that relying on the _embedded field is the correct method of identifying a MSC type for this processing.


> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Jody Grassel
>         Attachments: unitttest.patch
>
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Updated: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

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

Jody Grassel updated OPENJPA-1061:
----------------------------------

    Attachment: OpenJPA-1061_test_1.2.x.patch
                OpenJPA-1061_main_1.2.x.patch

Updated product code changes to resolve mapped superclass object id creation issue, and supporting JUnit test cases.

> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Michael Dick
>         Attachments: OpenJPA-1061_main_1.2.x.patch, OpenJPA-1061_test_1.2.x.patch
>
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Updated: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

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

Jody Grassel updated OPENJPA-1061:
----------------------------------

    Attachment: PCEnhancer.patch

Proposed fix, pending verification that _embedded is a suitable check for MSC.

> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Jody Grassel
>         Attachments: PCEnhancer.patch, unitttest.patch
>
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Updated: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

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

Jody Grassel updated OPENJPA-1061:
----------------------------------

    Attachment:     (was: OpenJPA-1061_1.2.x.patch)

> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Michael Dick
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Updated: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

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

Jody Grassel updated OPENJPA-1061:
----------------------------------

    Attachment: OpenJPA-1061_test_1.2.x.patch

> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Michael Dick
>         Attachments: OpenJPA-1061_main_1.2.x.patch, OpenJPA-1061_test_1.2.x.patch
>
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Updated: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

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

Michael Dick updated OPENJPA-1061:
----------------------------------

    Fix Version/s: 1.0.4

> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Michael Dick
>             Fix For: 1.0.4, 1.2.2, 1.3.0, 2.0.0-M3
>
>         Attachments: OpenJPA-1061_1.2.x.patch, OpenJPA-JIRA1061-packagerefactor-1.2.x.patch, OpenJPA-JIRA1061-packagerefactor-trunk.patch, OpenJPA-JIRA1061_1166-packagerefactor-1.2.x.patch
>
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Updated: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

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

Jody Grassel updated OPENJPA-1061:
----------------------------------

    Attachment:     (was: unitttest.patch)

> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Michael Dick
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Updated: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

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

Jody Grassel updated OPENJPA-1061:
----------------------------------

    Attachment: OPENJPA-1061_1.2.x.patch

Updated patch.  The previous patch failed when the MappedSuperclass had the id fields set to private-access.

> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Michael Dick
>         Attachments: OPENJPA-1061_1.2.x.patch
>
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Resolved: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

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

Michael Dick resolved OPENJPA-1061.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0
                   1.3.0
                   1.2.2

Thanks for the patch Jody

> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Michael Dick
>             Fix For: 1.2.2, 1.3.0, 2.0.0
>
>         Attachments: OpenJPA-1061_1.2.x.patch
>
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Updated: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

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

Jody Grassel updated OPENJPA-1061:
----------------------------------

    Attachment:     (was: OPENJPA-1061_1.2.x.patch)

> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Michael Dick
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Updated: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

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

Donald Woods updated OPENJPA-1061:
----------------------------------

    Patch Info: [Patch Available]

> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Jody Grassel
>         Attachments: OpenJPA-1061_1.2.x.patch, PCEnhancer.patch, unitttest.patch
>
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Updated: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

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

Jody Grassel updated OPENJPA-1061:
----------------------------------

    Attachment:     (was: OpenJPA-1061_test_1.2.x.patch)

> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Michael Dick
>         Attachments: OpenJPA-1061_main_1.2.x.patch
>
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Updated: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

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

Jody Grassel updated OPENJPA-1061:
----------------------------------

    Attachment:     (was: PCEnhancer.patch)

> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Michael Dick
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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


[jira] Updated: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter

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

Jody Grassel updated OPENJPA-1061:
----------------------------------

    Attachment: OpenJPA-JIRA1061_1166-packagerefactor-1.2.x.patch

Another pass at refactoring the package and class names.

> Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1061
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1061
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Jody Grassel
>            Assignee: Michael Dick
>             Fix For: 1.2.2, 1.3.0, 2.0.0
>
>         Attachments: OpenJPA-1061_1.2.x.patch, OpenJPA-JIRA1061-packagerefactor-1.2.x.patch, OpenJPA-JIRA1061-packagerefactor-trunk.patch, OpenJPA-JIRA1061_1166-packagerefactor-1.2.x.patch
>
>
> When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field.  This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy.  Attached to the JIRA is a junit test case that demonstrates the problem. 

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