Hello,

I have a vertex with some attributes and some edges, and I need to retrive 
it back as JSON, with the extra requirement that I also want to expand some 
edges.

Code is something like this: 

OSQLSynchQuery<ODocument> query = new OSQLSynchQuery<>("select from ? ");
List<ODocument> result = graphFactory.getDatabase().command(query).execute(
myId);


and I get the result as JSON with:

result.get(0).toJson();



If I try to expand the edges like:

select *, expand(out('E_SomeEdge')) as items from ?

the query only gives back the expand result ignoring the * or any 
specifically given fields.



If I try to: 

   1. retrieve the original result unchanged, 
   2. manually get the expanded result, 
   3. convert the expanded result to json, 
   4. set it into the original result, 
   5. finally convert the object to json, 

I'll end up with escaped quotation marks for the expanded bit, due to the 
double JSON conversion - which then I also have to clean up....



To me, this probably means I may not be using the API as intended. 



What's the proper way to achieve what I'm after?


Thanks,

Mihai

-- 

--- 
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 orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to