ravendb

Document structure for RavenDB

穿精又带淫゛_ 提交于 2019-12-12 19:11:04
问题 I have class class UserActivity { private IList<Activity> _activities = new List<Activity>(); public void AddActivity(Activity activity) { _activities.Add(activity); } public IEnumerable<Activity> ActivityHistory { return _activities; } } Activity history can have a lot of elements. I wish store UserActivity in RavenDB with history. But, when I get UserActivity first time from DB, ActivityHistory should have last 10 items, for example, and I should have possibility load other items or add new

RavenDb MapReduce over subset of Data

我的梦境 提交于 2019-12-12 13:05:34
问题 Say I have the given document structure in RavenDb public class Car { public string Manufacturer {get;set;} public int BuildYear {get;set;} public string Colour {get;set;} public string Id {get;set;} } When the user searches for all cars of colour Red and build year 2010, I want to show them a grouping for manufacturer as such: Toyota (12) Mazda (30) Given there are 12 toyotas and 30 mazdas that are red in colour and build year 2010. This is a simplified use case. The user can really specify

RavenDB Map/Reduce over property that is a list

笑着哭i 提交于 2019-12-12 12:43:47
问题 Just learning Map/Reduce and I'm missing a step. I've read this post ( RavenDB Map-Reduce Example using .NET Client ) but can't quite make the jump to what I need. I have an object: public class User : IIdentifiable { public User(string username) { Id = String.Format(@"users/{0}", username); Favorites = new List<string>(); } public IList<string> Favorites { get; protected set; } public string Id { get; set; } } What I want to do is get Map/Reduce the Favorites property across all Users.

NServiceBus 3.2 Samples Issue

坚强是说给别人听的谎言 提交于 2019-12-12 12:02:48
问题 I am trying to run the NServiceBus sample for AsyncPages. Seems simple enough. Download the latest from NServiceBus.com Execute the bat file to install prerequisites Open the solution Press F5 Enter a number into the textbox When I do that, I get a nasty RavenDB bug (NServiceBus uses this as a Data Store). Exception when starting endpoint, error has been logged. Reason: There is no index named: dynamic/TimeoutData It seems that RavenDB didn't or can't create an index. Not sure if this is a

RavenDB Query Documents with Property Removed

自作多情 提交于 2019-12-12 10:04:21
问题 In the RavenDB Studio, I can see 69 CustomVariableGroup documents. My query only returns 66 of them. After some digging, I see that the three docs that are not returned have the new class structure: a property was removed. Since I saved these three CustomVariableGroup documents, their structure is different from the other 66. Why though, when I query for all of them, do I only get the other 66 documents with the old structure? Both my C# code, and my query in LinqPad, only return the 66. Here

RavenDb - The remote server returned an error: (403) Forbidden

北战南征 提交于 2019-12-12 07:46:24
问题 When I try to create a database people collection on RavenDb, I get the following error: The remote server returned an error: (403) Forbidden. I hots the Raven on IIS and I am not sure what is going on. On the raven Management Studio, when I try to create a database, I get the below result: Could not authenticate against server Message: The remote server returned an error: NotFound. Uri: /databases?database=Default Server Uri: http://localhost:8888/docs/Raven/Databases/People -- Error

RavenDB Ids and ASP.NET MVC3 Routes

笑着哭i 提交于 2019-12-12 07:44:25
问题 Just building a quick, simple site with MVC 3 RC2 and RavenDB to test some things out. I've been able to make a bunch of projects, but I'm curious as to how Html.ActionLink() handles a raven DB ID. My example: I have a Document called "reasons" (a reason for something, just text mostly), which has reason text and a list of links. I can add, remove, and do everything else fine via my repository. Below is the part of my razor view that lists each reason in a bulleted list, with an Edit link as

“Could not find transactional storage type” error with embedded RavenDB

吃可爱长大的小学妹 提交于 2019-12-12 07:26:05
问题 I was able to successfully run a simple test for RavenDB based on the code found at: http://ravendb.net/tutorials/hello-world Next I tried to run it in an Embedded Manner, but I keep on getting the following error: Message: Could not find transactional storage type: Raven.Storage.Esent.TransactionalStorage, Raven.Storage.Esent StackTrace: at Raven.Database.Config.InMemoryRavenConfiguration.CreateTransactionalStorage(Action notifyAboutWork) in c:\Builds\raven\Raven.Database\Config

RavenDB: Use Fiddler to retrieve the structure of the queries sent to the database

邮差的信 提交于 2019-12-12 06:26:19
问题 Is it possible to use Fiddler 4 to retrieve the structure of the queries sent to RavendB (C#)? In fact, I am currently using session.Query() to write queries to manage the data stored in a RavenDB database. I would like to transform all these queries into session.Advanced.DocumentQuery() queries. But, some of these queries are complex. Is it possible to use fiddler to see how RavenDB transform the session.Query() queries I run into session.Advanced.DocumentQuery() queries? If so, how can I

Finding complete sequences using a RavenDb index

不羁的心 提交于 2019-12-12 05:39:52
问题 I have documents in RavenDb that may look something like this: { "Id": "obj/1", "Version": 1 }, { "Id": "obj/1", "Version": 2 }, { "Id": "obj/1", "Version": 3 }, { "Id": "obj/1", "Version": 4 }, { "Id": "obj/2", "Version": 1 }, { "Id": "obj/2", "Version": 2 }, { "Id": "obj/2", "Version": 3 }, { "Id": "obj/3", "Version": 1 }, { "Id": "obj/3", "Version": 3 } I'm trying to create an index that would give me: The sequences "obj/1" and "obj/2", preferably grouped by Id. Not the sequence "obj/3",