In RavenDB 3.5, I could use a Transformer and call Include<T>() on the result of a Load<T> in order to include nested data, but I'm having a difficult time figuring out how to reproduce this behavior in RavenDB 4.0. Is it even possible?
But in RavenDB 4.0, I can't get to an Include<T> after I use RavenQuery.Load<T>. The goal is to optimize the request so that subsequent requests won't be as expensive.
System.InvalidOperationException : No idea how to deal with convert Load(n.Pages.get_Item("Endowments")) to a member expression
Hibernating Rhinos Ltd
Oren Eini l CEO l 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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hibernating Rhinos Ltd
Grisha Kotler l RavenDB Core Team Developer l Mobile: +972-54-586-8647
Office: +972-4-622-7811 l Fax: +972-153-4-622-7811
RavenDB paving the way to "Data Made Simple" http://ravendb.net/
What do you mean by "can you show the document directly?" I'm afraid I do not understand. Is it possible to do LINQ expressions in a RawQuery like that, as well?
--
{
Id: string,
Owner: string,
Name: string,
Pages: {
Endowments: string[],
Allocations: string[]
}
}
{
Id: string,
Name: string,
Chosen: [
{
Id: string,
Name: string,
// ...
}
]
}
My biggest problem is that I don't even know where to begin for the LINQ queries in RQL.
--
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/8NlMEpLTnRs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.
Hibernating Rhinos Ltd
Oren Eini l CEO l Mobile: + 972-52-548-6969
My biggest problem is that I don't even know where to begin for the LINQ queries in RQL.
On Thu, Nov 30, 2017, 7:27 AM Ciel <stacey.ci...@gmail.com> wrote:
And then the loaded documents have a shape that looks like this;--
{
Id: string,
Name: string,
Chosen: [
{
Id: string,
Name: string,
// ...
}
]
}
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/8NlMEpLTnRs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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+unsubscribe@googlegroups.com.
Certainly.
Can you do the following?Create a sample database with the documents structure in 4.live-test.ravendb.netAnd show the sample output you want?Hibernating Rhinos Ltd
Oren Eini l CEO l Mobile: + 972-52-548-6969
On Thu, Nov 30, 2017 at 5:01 PM, Ciel <stacey.ci...@gmail.com> wrote:
My biggest problem is that I don't even know where to begin for the LINQ queries in RQL.
On Thu, Nov 30, 2017, 7:27 AM Ciel <stacey.ci...@gmail.com> wrote:
And then the loaded documents have a shape that looks like this;--
{
Id: string,
Name: string,
Chosen: [
{
Id: string,
Name: string,
// ...
}
]
}
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/8NlMEpLTnRs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--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.
--
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/8NlMEpLTnRs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.
{
"Id": "characters/1/notebooks/1",
"Name": "CHARACTER_A",
"Endowments": [
"endowments/66",
"endowments/4",
"endowments/16",
"endowments/7",
"endowments/45",
"endowments/16",
"endowments/32"
]
}
Normally, the data in those documents isn't needed, and there's a lot of it, so I opted not to denormalize much of it. There will be other kinds of pages in the dictionary on the notebook, so I can't just save them as a big string array because there has to be a way to infer the specific type at some point.
--
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/8NlMEpLTnRs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.
declare function Ids(e) {ids = [];for(var i = 0; i < e.length; i++)for(var j = 0; j < e[i].Chosen.length; j++){var c = e[i].Chosen[j];ids.push(c.Id);}return ids;}from notebooks as nload n.Pages.Endowments as e[]select n.Id, n.Name, Ids(e) as Endowments
To unsubscribe from this group and all its topics, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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+unsubscribe@googlegroups.com.
Hibernating Rhinos Ltd
Oren Eini l CEO l Mobile: + 972-52-548-6969
Office: +972-4-622-7811 l Fax: +972-153-4-622-7811
To unsubscribe from this group and all its topics, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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+unsubscribe@googlegroups.com.
Thank you both so much! I had no idea you could use pure Javascript in RQL!
So can you have multiple selects? For example, there will be other collections I eventually want to include in the same way shortly, in the same query, but don't necessarily want to have them in the final model. The purpose of including them is just to make subsequent pieces of the code more efficient.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--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.
--
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/8NlMEpLTnRs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--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+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/8NlMEpLTnRs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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+unsubscribe@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--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.
--
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/8NlMEpLTnRs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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.
--
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/8NlMEpLTnRs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.
from Notebooks as nload n.Pages.Endowments as e[]
load n.Pages.Traits as t[]
load n.Pages.Commands as c[]select n.Name
Hibernating Rhinos Ltd
Oren Eini l CEO l Mobile: + 972-52-548-6969
Office: +972-4-622-7811 l Fax: +972-153-4-622-7811
Hibernating Rhinos Ltd
Oren Eini l CEO l Mobile: + 972-52-548-6969
Office: +972-4-622-7811 l Fax: +972-153-4-622-7811
"There is another issue, and that is that the include operates on the shape of the output, not the shape of the query, so you'll want to include it in the output, or use a function"
Forgive me, but I'm a little unclear on what this means. You said I can use include on things not in the output, but this sounds contradictory to that. Can I bother for an example of what said function might be like then?
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/8NlMEpLTnRs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.
Hibernating Rhinos Ltd
Oren Eini l CEO l Mobile: + 972-52-548-6969
Office: +972-4-622-7811 l Fax: +972-153-4-622-7811
"There is another issue, and that is that the include operates on the shape of the output, not the shape of the query, so you'll want to include it in the output, or use a function"
Forgive me, but I'm a little unclear on what this means. You said I can use include on things not in the output, but this sounds contradictory to that. Can I bother for an example of what said function might be like then?
On Sun, Dec 3, 2017, 7:51 AM Oren Eini (Ayende Rahien) <aye...@ayende.com> wrote:
No, there is no such way.This is by design, because otherwise you'll run into issue that route (see, stored procedures and how they are handled).Hibernating Rhinos Ltd
Oren Eini l CEO l Mobile: + 972-52-548-6969
Office: +972-4-622-7811 l Fax: +972-153-4-622-7811
On Sun, Dec 3, 2017 at 10:26 AM, Ciel <stacey.ci...@gmail.com> wrote:--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+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/8NlMEpLTnRs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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+unsubscribe@googlegroups.com.
declare function foo(){// you can call include on anything here.}include // only things that are in the output will be included.Note that this make sense, because you need to know what to call Load on in the client side, otherwise you are just including documents for no reasonHibernating Rhinos Ltd
Oren Eini l CEO l Mobile: + 972-52-548-6969
Office: +972-4-622-7811 l Fax: +972-153-4-622-7811
On Mon, Dec 4, 2017 at 10:43 PM, Ciel <stacey.ci...@gmail.com> wrote:
"There is another issue, and that is that the include operates on the shape of the output, not the shape of the query, so you'll want to include it in the output, or use a function"
Forgive me, but I'm a little unclear on what this means. You said I can use include on things not in the output, but this sounds contradictory to that. Can I bother for an example of what said function might be like then?
On Sun, Dec 3, 2017, 7:51 AM Oren Eini (Ayende Rahien) <aye...@ayende.com> wrote:
No, there is no such way.This is by design, because otherwise you'll run into issue that route (see, stored procedures and how they are handled).Hibernating Rhinos Ltd
Oren Eini l CEO l Mobile: + 972-52-548-6969
Office: +972-4-622-7811 l Fax: +972-153-4-622-7811
On Sun, Dec 3, 2017 at 10:26 AM, Ciel <stacey.ci...@gmail.com> wrote:--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.
--
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/8NlMEpLTnRs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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.
--
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/8NlMEpLTnRs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/8NlMEpLTnRs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/8NlMEpLTnRs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/8NlMEpLTnRs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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.
--
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/8NlMEpLTnRs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.