openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jody Grassel (JIRA)" <j...@apache.org>
Subject [jira] Updated: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
Date Wed, 06 May 2009 17:01:30 GMT

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


Mime
View raw message