Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 283028 - Add support for letting an @Embeddable extend a @MappedSuperclass
Summary: Add support for letting an @Embeddable extend a @MappedSuperclass
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 enhancement with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL: http://www.nabble.com/Re%3A-More-DDL-...
Whiteboard:
Keywords:
Depends on:
Blocks: 325467 325524 312910
  Show dependency tree
 
Reported: 2009-07-09 10:15 EDT by Laird Nelson CLA
Modified: 2022-06-09 10:23 EDT (History)
5 users (show)

See Also:


Attachments
Proposed changes (116.62 KB, patch)
2010-09-16 09:04 EDT, Guy Pelletier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Laird Nelson CLA 2009-07-09 10:15:48 EDT
The summary and URL say it all.
Comment 1 Tom Ware CLA 2009-07-09 10:27:00 EDT
As promised in the mailing list posting, here is a pointer to where someone would get started adding this code:

Look in the org.eclipse.persistence.jpa component.

The method org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.preProcess() enables this functionality for Entities.

You can see a call to discoverMappedSuperclassesAndInheritanceParents() that does the initial discovery.  Additionally, some of the calls below that call make use of that functionality.

To enable this for Embeddables, similar code would have to be enabled in  org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EmbeddableAccessor.preProcess()

There is likely a bit of refactoring that has to occur to make this occur easily, but I would estimate this to be a medium-difficulty fix.
Comment 2 Tom Ware CLA 2009-07-15 14:58:47 EDT
Setting initial target and priority.  Information about what that means can be found here:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines
Comment 3 Peter Krogh CLA 2009-11-27 13:41:21 EST
This bug fix did not make the cut off for 2.0.0. We are deferring the bugs to Future where we can properly sort them all together based on community votes and severity. We will then assign them accordingly to future patch sets and releases.
Comment 4 Peter Krogh CLA 2009-11-30 11:36:50 EST
Changing the priority of the bugs that have been recently triaged to future.  Targetting them to P2 will differentiate them from the P3s that have been triaged into future earlier.
Comment 5 Guy Pelletier CLA 2010-09-16 09:04:40 EDT
Created attachment 179028 [details]
Proposed changes

Adds support for embeddable's to extend mapped superclasses.

Those items from mapped superclasses supported for embeddables are:

- metadata-complete
- exclude-default-mappings
- converters
- attribute-overrides
- association-overrides
- change-tracking
- customizer
- copy policies
- properties

All other metadata (id-class, primary-key etc, listeners etc. ) from an embeddable's mapped superclass are silently ignored.

And now supported on embeddable's:

- attribute-overrides
- association-overrides
- parent-class (for Virtual classes)
Comment 6 Guy Pelletier CLA 2010-09-16 14:48:19 EDT
Bug 283028 - Add support for letting an @Embeddable extend a @MappedSuperclass

Reviewed by: Tom Ware, Michael O'Brien (ongoing)

Modified existing inherited model and InheritedModelJunitTest
Comment 7 Guy Pelletier CLA 2010-09-17 08:08:16 EDT
Just to be 100% accurate, I forgot to add 'attributes' to the supported list of metadata from mapped superclasses.
Comment 8 Eclipse Webmaster CLA 2022-06-09 10:16:33 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 9 Eclipse Webmaster CLA 2022-06-09 10:23:23 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink