Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Sequence with Table for mapped-superclass
Sequence with Table for mapped-superclass [message #379582] Sun, 17 August 2008 22:11 Go to next message
Rama Notowidigdo is currently offline Rama NotowidigdoFriend
Messages: 19
Registered: July 2009
Junior Member
Hi All,

I have a BaseModel class with attributed "id".
In the ORM it is mappe as :

<mapped-superclass class="BaseModel">
<id name="id">
<generated-value strategy="TABLE" generator="Sequence"/>
<table-generator name="Sequence"
table="SEQUENCE" initial-value="100"
allocation-size="100" pk-column-name="SEQ_NAME"

In addition I have several derived classes for BaseModel such as Person
and Email.

However, for each derived class, I want to map using different sequece
PERSON_SEQ and EMAIL_SEQ. What's the best way to accomplish this with JPA?

It is easy to do in EclipseLink but no idea how to do this with JPA...:(

Re: Sequence with Table for mapped-superclass [message #379598 is a reply to message #379582] Mon, 18 August 2008 17:47 Go to previous message
James is currently offline JamesFriend
Messages: 272
Registered: July 2009
Senior Member
I suppose one way is to not define the id in the MappedSuperclass, only
define it in the subclasses.

In EclipseLink, you could also use a DescriptorCustomizer in the

-- James
Previous Topic:How to mutliple-join-fetch?
Next Topic:rcp, osgi, and dynamic weaving
Goto Forum:

Current Time: Sun May 27 12:17:18 GMT 2018

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

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

Back to the top