-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Adding range to Annotation Generator[Class="identity&qu
PostPosted: Wed Sep 26, 2007 4:43 am 
Newbie

Joined: Wed Sep 26, 2007 3:54 am
Posts: 2
Hibernate version: 1.2.0

Name and version of the database you are using: Mssql 2005

We are trying to get NHibernate to generate a create script which sets "Identity(1000, 1)". Simply put this means that the ids generated are not less than 1000 and incremented by 1. I have searched the forums and probably half of the interne t to find a setting which does this, but to no avail.

Does anyone know how we can achieve this (without any human interaction)?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 26, 2007 11:08 am 
Regular
Regular

Joined: Fri Jan 20, 2006 7:45 pm
Posts: 97
Location: San Antonio, TX
If you are using the identifier generated by the datase (ex. generator class="native" or identity) then I believe you are stuck with setting the key generation policy in the database. I'm developing on Oracle and have to do that with the sequences that I create.

_________________
Dum spiro, spero
-------------------------------
Rate my post if it helps...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.