Getting versioned objects between a date range

14 views
Skip to first unread message

Peter Morris

unread,
Oct 31, 2014, 4:18:23 PM10/31/14
to rav...@googlegroups.com
Sorry if this is documented somewhere, but I can't find it.

If I version a collection, how do I know which version numbers to use in order to retrieve a list of versions between two dates?  I effectively want to loop through a date range (usually one calendar month) and calculate an accumulative value based on what the properties were of the object in question for that specific date.

Chris Marisic

unread,
Oct 31, 2014, 4:40:28 PM10/31/14
to rav...@googlegroups.com
What do you mean by version a collection?

Are you referring to a collection inside RavenDB such as you insert a bunch of public class MyEvent?

That you have public class MyEventBag { List<Event> Events }?

Both of those can be solved with a simple index.

The RavenDB versioning bundle is likely not what you want. If you use the versioning bundle you can get back a list of versions for the object and then you need to inspect the metadata for the create times to pick the versions that are between X & Y dates

Peter Morris

unread,
Nov 1, 2014, 9:36:56 AM11/1/14
to rav...@googlegroups.com
Thanks Chris

I think I will create a secondary collection for the histories then. Thanks :)
Reply all
Reply to author
Forward
0 new messages