ravendb

RavenDB using filter with group by

故事扮演 提交于 2021-01-27 20:01:14
问题 I have a Transaction entity. I can make group by by (CustomerCode, CustomerName) then select CustomerCode and Total(Amount). It is easy. But When I Want to filter AtCreated. I have An Error. Unhandled exception. Raven.Client.Exceptions.InvalidQueryException: Raven.Client.Exceptions.InvalidQueryException: Field 'AtCreated' isn't neither an aggregation operation nor part of the group by key Query: from Transactions group by CustomerCode, CustomerName where AtCreated >= $p0 select CustomerCode,

RavenDB Map/Reduce/Transform on nested, variable-length arrays

二次信任 提交于 2021-01-27 07:34:13
问题 I'm new to RavenDB, and am loving it so far. I have one remaining index to create for my project. The Problem I have thousands of responses to surveys (i.e. " Submissions "), and each submission has an array of answers to specific questions (i.e. " Answers "), and each answer has an array of options that were selected (i.e. " Values "). Here is what a single Submission basically looks like: { "SurveyId": 1, "LocationId": 1, "Answers": [ { "QuestionId": 1, "Values": [2,8,32], "Comment": null }

RavenDB Map/Reduce/Transform on nested, variable-length arrays

前提是你 提交于 2021-01-27 07:28:59
问题 I'm new to RavenDB, and am loving it so far. I have one remaining index to create for my project. The Problem I have thousands of responses to surveys (i.e. " Submissions "), and each submission has an array of answers to specific questions (i.e. " Answers "), and each answer has an array of options that were selected (i.e. " Values "). Here is what a single Submission basically looks like: { "SurveyId": 1, "LocationId": 1, "Answers": [ { "QuestionId": 1, "Values": [2,8,32], "Comment": null }

RavenDB Map/Reduce/Transform on nested, variable-length arrays

狂风中的少年 提交于 2021-01-27 07:27:35
问题 I'm new to RavenDB, and am loving it so far. I have one remaining index to create for my project. The Problem I have thousands of responses to surveys (i.e. " Submissions "), and each submission has an array of answers to specific questions (i.e. " Answers "), and each answer has an array of options that were selected (i.e. " Values "). Here is what a single Submission basically looks like: { "SurveyId": 1, "LocationId": 1, "Answers": [ { "QuestionId": 1, "Values": [2,8,32], "Comment": null }

Add extra column/field to RavenDB collection via RQL in Raven Studio

强颜欢笑 提交于 2020-05-15 07:44:29
问题 I'm trying to update the entire collection by adding an extra field to each entity. This doesn't do the trick: from things as t update { put( id(t), "NewField"); } Can someone help out with the syntax please ? Thanks ! 回答1: Just do: from things as t update { t.nameOfNewField = "valueOfNewField" } See: https://ravendb.net/learn/inside-ravendb-book/reader/4.0/2-zero-to-ravendb#patching-documents 来源: https://stackoverflow.com/questions/60413448/add-extra-column-field-to-ravendb-collection-via

Add extra column/field to RavenDB collection via RQL in Raven Studio

大城市里の小女人 提交于 2020-05-15 07:41:24
问题 I'm trying to update the entire collection by adding an extra field to each entity. This doesn't do the trick: from things as t update { put( id(t), "NewField"); } Can someone help out with the syntax please ? Thanks ! 回答1: Just do: from things as t update { t.nameOfNewField = "valueOfNewField" } See: https://ravendb.net/learn/inside-ravendb-book/reader/4.0/2-zero-to-ravendb#patching-documents 来源: https://stackoverflow.com/questions/60413448/add-extra-column-field-to-ravendb-collection-via

Add extra column/field to RavenDB collection via RQL in Raven Studio

纵然是瞬间 提交于 2020-05-15 07:41:14
问题 I'm trying to update the entire collection by adding an extra field to each entity. This doesn't do the trick: from things as t update { put( id(t), "NewField"); } Can someone help out with the syntax please ? Thanks ! 回答1: Just do: from things as t update { t.nameOfNewField = "valueOfNewField" } See: https://ravendb.net/learn/inside-ravendb-book/reader/4.0/2-zero-to-ravendb#patching-documents 来源: https://stackoverflow.com/questions/60413448/add-extra-column-field-to-ravendb-collection-via

Autogenerated Id in RavenDB

风格不统一 提交于 2020-04-15 19:25:13
问题 Please I am using the default ID Generation in raven DB inserting and everything seems to work fine for now However My ID Has the following format "entityName/1" so if added as a route value, the following URL Results http://localhost:10563/Settings/Edit/SystemSettings/1 Which as u can guess results in the following message Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please

RavenDb QueryYourWrites and Map/Reduce indexes

时间秒杀一切 提交于 2020-02-21 11:03:23
问题 I got the following comment to my previous question about RavenDb: One thing to note, QueryYourWrites doesn't work with Map/Reduce indexes. For these you have to use WaitForNonStaleResults..() What does it mean? I thought all indexes in RavenDb are Map/Reduce indexes... In which cases does QueryYourWrites option work? 回答1: Sorry, I wrote that comment and I wasn't very clear. RavenDB indexes always need to have a Map part, but the Reduce is optional. So if you don't specify a Reduce function,

RavenDb QueryYourWrites and Map/Reduce indexes

落花浮王杯 提交于 2020-02-21 11:03:19
问题 I got the following comment to my previous question about RavenDb: One thing to note, QueryYourWrites doesn't work with Map/Reduce indexes. For these you have to use WaitForNonStaleResults..() What does it mean? I thought all indexes in RavenDb are Map/Reduce indexes... In which cases does QueryYourWrites option work? 回答1: Sorry, I wrote that comment and I wasn't very clear. RavenDB indexes always need to have a Map part, but the Reduce is optional. So if you don't specify a Reduce function,