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 <[EMAIL PROTECTED]> 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

Reply via email to