Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Can we hardcode the starting number for HiLo?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Justin A  
View profile  
 More options May 26 2012, 12:11 pm
From: Justin A <jus...@adler.com.au>
Date: Sat, 26 May 2012 09:11:40 -0700 (PDT)
Local: Sat, May 26 2012 12:11 pm
Subject: Can we hardcode the starting number for HiLo?

Hi Folks,

I understand that we can change the -size- of a HiLo batch/block... but can
we determine the starting number, for HiLo?

Why? I'm playing around with some unit tests and have some hard coded fake
data. In this data, i'm hardcoding the Id's .. i was hoping to mix-n-match
.. so the HiLo can kick off for all new items after my hard coded list.

eg.

Store(new Foo(1));
Store(new Foo(2));
Store(new Foo()); // HiLo will start, with the id being foos/3

Is this possible?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oren Eini (Ayende Rahien)  
View profile  
 More options May 26 2012, 12:38 pm
From: "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
Date: Sat, 26 May 2012 19:38:01 +0300
Local: Sat, May 26 2012 12:38 pm
Subject: Re: [RavenDB] Can we hardcode the starting number for HiLo?

Sure,
As the very first thing you do in the app, do:

session.Store( new { Max = 1024} , "Raven/Hilo/Foos");
session.SaveChanges();

Your hilo ranges will now start after 1024


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Justin A  
View profile  
 More options May 26 2012, 9:04 pm
From: Justin A <jus...@adler.com.au>
Date: Sat, 26 May 2012 18:04:51 -0700 (PDT)
Local: Sat, May 26 2012 9:04 pm
Subject: Re: [RavenDB] Can we hardcode the starting number for HiLo?

AHH! tricky :) u manually create the doc/collection :)

awesome!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »