Hi,
you could use

Iterable<OrientVertex> resultEhr = g.command( new OCommandSQL("select 
@this.toJSON() as this from EHR where ehrId = '" + ehrId + "'") ).execute();
if (resultEhr.iterator().hasNext()){
   Vertex ehr = (Vertex) resultEhr.iterator().next(); 
   System.out.println(ehr.getProperty("this"));
}

You get for example 

{"@type":"d","@rid":"#21:0","@version":1,"@class":"EHR","name":"name1","ehrId":"id1"}


Best regards,
Alessandro

-- 

--- 
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