Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Mapping inherited id attribute
Mapping inherited id attribute [message #385404] Wed, 28 January 2009 00:00 Go to next message
David J Rericha is currently offline David J RerichaFriend
Messages: 13
Registered: July 2009
Junior Member
Dear fellow members,

I would like to inherit an id attribute from a mapped superclass using a
Table sequence generator. However, I would like the column names and the
sequence names to be different for the subclasses. I found this question
asked here: /msg00180.html,
but I could not figure it out. If a DescriptorCustomizer is the way to do
this, could you provide an example? I cannot find anything explicit in
the documentation.


Re: Mapping inherited id attribute [message #385408 is a reply to message #385404] Wed, 28 January 2009 13:51 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

JPA does not allow you to override a generator in a subclass.

To use a DescriptorCustomizer it would do something like:

public class MyCustomizer implements DescriptorCustomizer {
public void customize(ClassDescriptor descriptor) {

Where SUB_SEQ was another sequence generator that you defined.

For a list of ClassDescriptor API see,

href=" (ELUG)#How_to_Configure_Sequencing_at_the_Descriptor_Level_U sing_Java ">User


James : Wiki : Book : Blog : Twitter
Previous Topic:Caching or Isolations-Level Problem?
Next Topic:JDK 1.4?
Goto Forum:

Current Time: Tue Apr 24 01:12:13 GMT 2018

Powered by FUDForum. Page generated in 0.01933 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software