openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <michael.d.d...@gmail.com>
Subject Re: Could I generate ID without the OPENJPA_SEQUENCE_TABLE table?
Date Tue, 31 Mar 2009 20:19:25 GMT
Hi,

Disclosure I'm not an expert on SQLServer, and I don't have access to a
SQLServer instance to test with at the moment.

It looks like SQLServer doesn't support sequences but there are some
alternatives besides an IDENTITY column [1]. From a JPA standpoint I think
you'd annotate the field in the same manner as you would when using IDENTITY
though.

[1]
http://www.sqljunkies.ddj.com/Article/4067A1B1-C31C-4EAF-86C3-80513451FC03.scuk

OTOH this is probably the same thing you're trying to avoid by not having
IDENTITY columns. If that's the case then you'll have to generate a table
(similar to OPENJPA_SEQUENCE_TABLE) or manually manage the primary key
column in your app.

Hope this helps,
-mike

2009/3/29 乔木 <qiaomuf@gmail.com>

> SQL Server (without IDENTITY Column)
>
> 2009/3/29 Paul Copeland <tech@jotobjects.com>
>
> > Your alternatives depend on the database you are using. What database?
> >
> > On 3/28/2009 6:24 PM, 乔木 wrote:
> > > I don't want openjpa to create that table
> > >
> > >
> >
> >
>
>
> --
> Best wishes,
> 乔木
> MOE KLINNS Lab and SKLMS Lab, Xi'an Jiaotong University
> Department of Computer Science and Technology, Xi’an Jiaotong University
> TEL: 15991676983
> E-mail: qiaomuf@gmail.com
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message