Are there "hidden" HiLo generators?

27 views
Skip to first unread message

Stacey

unread,
Feb 2, 2016, 7:54:43 AM2/2/16
to RavenDB - 2nd generation document database
I'm having a strange situation where I think something hidden is generating a HiLo identity for a document.

I have an entity named "Book" that hooks into Raven's Identity system to generate the following ID: "{variable}/book/"

So this generates books sequentially - and it works just fine.

But if I delete all documents, all indexes, and all HiLo documents in the database then run my code again, the number it appends to the end of a book picks up from where it was before I cleared all the documents.

is there a way to reset this? I'm not finding a "Raven/Hilo" document for it anywhere.

Oren Eini (Ayende Rahien)

unread,
Feb 2, 2016, 7:58:35 AM2/2/16
to ravendb
You are using identities, and they aren't stored as documents.
That is internal state for the database, and can be reset using (SetIdentityFor), but it isn't stored as docs

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stacey

unread,
Feb 2, 2016, 8:05:28 AM2/2/16
to RavenDB - 2nd generation document database
Is it SetIdentityFor, or SeedIdentityFor? I'm not finding a SetIdentityFor method in Raven.

Oren Eini (Ayende Rahien)

unread,
Feb 2, 2016, 8:06:43 AM2/2/16
to ravendb
YEs, seed
Reply all
Reply to author
Forward
0 new messages