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 乔木 <[email protected]> > SQL Server (without IDENTITY Column) > > 2009/3/29 Paul Copeland <[email protected]> > > > 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: [email protected] >
