Hi,

I noticed that calling oEntity.getIdentity()on the oDocument instance 
returnd by getEntries(...) returns "#-1:-1" even though it's supposed to 
represent a persisted instance.

Does that help at all?

Regards,
  -Stefán

On Tuesday, January 28, 2014 4:42:24 PM UTC, [email protected] 
wrote:
>
> Yup,
>
> It's the first thing I tried but it seems to return a corrupt instance 
> that throws a NullPointerException no matter what.
>
>    - OrientVertex oEntity = graph.getVertex(entityDocument);
>    - if (oEntity == null) -> throws a null pointer exception
>    - if ("" + oEntity) -> throws a null pointer exception
>
> Regards,
>   -Stefán
>
> On Tuesday, January 28, 2014 4:35:43 PM UTC, Lvc@ wrote:
>>
>> Hi,
>> the graph.getVertex() accepts the ODocument and ORID. Have you tried with:
>>
>>     OrientVertex oEntity = graph.getVertex(entityDocument);
>>
>> Lvc@
>>
>>
>>
>> On 28 January 2014 17:33, <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> I'm retrieving a document from an index (works fine):
>>>
>>> entities = 
>>> entityBaseClass.getClassIndex(GraphModel.IDX_ENTITY_REFERENCE).getEntries(references);
>>>
>>>
>>> Calling the getVertex with the ODocument item returns null:
>>>
>>> for (ODocument entityDocument : entities) {
>>>
>>>     OrientVertex oEntity = graph.getVertex(entityDocument.getIdentity()
>>> );
>>>
>>>
>>> I need and OrientVertex instance to work with and there is no obvious 
>>> way to cast ODocument to OrientVertex.
>>>
>>> I find no form of this that works: OrientVertex oEntity = 
>>> entityDocument.getRecord();
>>>
>>>
>>> Thank you.
>>>   -Stefán
>>>
>>> -- 
>>>  
>>> --- 
>>> 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/groups/opt_out.
>>>
>>
>>

-- 

--- 
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/groups/opt_out.

Reply via email to