Take a look at:

http://www.orientechnologies.com/docs/1.7.8/orientdb.wiki/Fetching-Strategies.html#remote-connection

Lvc@
ᐧ


On 22 August 2014 18:13, Brendan Maginnis <[email protected]>
wrote:

> Hi Lvc,
>
> This is exactly what I needed - thanks
>
> The only wrinkle is that if I do setFetchPlan on the query it doesn't seem
> to work, it only works when I do
> toJSON("fetchPlan:*:-1")
>
> Is this the expected behaviour?
>
> Cheers
>
>
>
> On Friday, 22 August 2014 13:58:28 UTC+1, Lvc@ wrote:
>
>> Hi,
>> Try using fetchplan:
>>
>> http://www.orientechnologies.com/docs/1.7.8/orientdb.wiki/
>> Fetching-Strategies.html
>>
>> Lvc@
>>
>> ᐧ
>>
>>
>> On 22 August 2014 14:15, Brendan Maginnis <[email protected]> wrote:
>>
>>> Hi Curtis,
>>>
>>> I don't think that flatten does what I need.
>>>
>>> I'm trying to use Orient as a document store where I can save a json
>>> object containing other json objects. Then I want to retrieve the top level
>>> json object along with the full tree of subobjects.
>>> Is it possible to do this?
>>>
>>> On Thursday, 21 August 2014 16:29:55 UTC+1, Curtis Mosters wrote:
>>>>
>>>> Hi I think you have kind of these issues:
>>>> https://github.com/orientechnologies/orientdb/issues/1332
>>>> https://groups.google.com/forum/#!topic/orient-database/KiT4WoANxUE
>>>>
>>>> Did you already try to use flatten() on the dataset?
>>>>
>>>> Am Donnerstag, 21. August 2014 17:20:34 UTC+2 schrieb Brendan Maginnis:
>>>>>
>>>>> Hi,
>>>>>
>>>>> We're evaluating whether to use OrientDB at our company. So far it
>>>>> looks really great.
>>>>>
>>>>> We will need to store documents with nested documents within them.
>>>>> The schema won't be known until runtime but we need to fetch the full
>>>>> nested documents as json
>>>>>
>>>>> Using the document api in 1.7.8 I can create a document with a sub
>>>>> document like so
>>>>> ODocument doc = new ODocument("mydoc");
>>>>> ODocument subdoc = new ODocument("subdoc");
>>>>> subdoc.field("name", "Tom");
>>>>> doc.field("subdoc", subdoc);
>>>>> doc.save();
>>>>>
>>>>> If I then fetch it using the following query
>>>>> select * from mydoc where subdoc.name = 'Tom'
>>>>>
>>>>> and call toJSON on it I get
>>>>> {"@type":"d","@rid":"#9:55","@version":1,"@class":"mydoc","subdoc":
>>>>> "#14:0"}
>>>>>
>>>>>
>>>>> I would like to retrieve the full nested document including all the
>>>>> fields from subdoc
>>>>> {"@type":"d","@rid":"#9:55","@version":1,"@class":"mydoc", "subdoc":{
>>>>> "name":"Tom"}}
>>>>>
>>>>> How would I do this?
>>>>>
>>>>> Cheers!
>>>>>
>>>>>
>>>>>  --
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "OrientDB" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to