openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gene Wu <gene...@hotmail.com>
Subject RE: sequence per entity
Date Thu, 16 Aug 2007 16:26:30 GMT
Hi Patrick,
 
Yes, I catch your meaning.
 
Here is my guess of Uri's requirement:
1. There is a BasicEntity, which provides id field annotated as generatedvalue. 
2. There are several concrete entity classes inherit from BasicEntity.
3. Every entity uses different sequence.
 
Because developer can't override any id field in MappedSuperclass, he can't make different
setting in concrete entities.
So in my opinion, he have to make some customization in OpenJPA to support it. 
 
Thanks,
 
Gene.



> Date: Thu, 16 Aug 2007 06:30:06 -0700> From: plinskey@gmail.com> To: users@openjpa.apache.org>
Subject: Re: sequence per entity> > Hi,> > Actually, OpenJPA does support sequence-per-class
behavior. I believe> that you'll need to declare your base class as a @MappedSuperclass
to> use it, although I might be wrong about that.> > Set the 'openjpa.Sequence' setting
to 'class-table' to do this.> > -Patrick> > On 8/16/07, Gene Wu <gene_wu@hotmail.com>
wrote:> >> > I think there is no possibility to have different sequence with the
standard> > OpenJPA.> >> > If this requirement is critical one, and you
don't care to have a customized> > version of OpenJPA. My initial thought is a sequence
plug-in, you can check> > "org.apache.openjpa.jdbc.conf.JDBCSeqValue" as a reference.>
>> > Thanks> >> > Gene.> >> >> >> >> >>
> Uri Boness wrote:> > >> > > I would like to have a parent class for
all entities (e.g. BasicEntity)> > > which also holds the id field. When mapping
the id with a sequence> > > generator, currently openjpa generates only one sequence
in the database> > > (postgresql 8.2). Is there a way to configure openjpa (or maybe
setup the> > > mappings in a special way) so that a a different sequence will be
used for> > > different entities (while still keeping the id field in the BasicEntity>
> > parent class)?> > >> > > cheers,> > > Uri> > >>
> >> >> > --> > View this message in context: http://www.nabble.com/sequence-per-entity-tf4275432.html#a12178588>
> Sent from the OpenJPA Users mailing list archive at Nabble.com.> >> >>
> > -- > Patrick Linskey> 202 669 5907
_________________________________________________________________
Learn. Laugh. Share. Reallivemoms is right place!
http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message