Luca

 Thanks. I wonder if I can quickly patch up that class to do what I need it 
to do. Not sure how long it will take for you guys to get to this. 
 I actually was able to pass in the @class property and it does create 
Edges using the passed in classes But it does not create lightweight edges 
and so they do not have Labels associated with them.
 Interestingly, without labels it is not easy to traverse the Edges. I did 
not realize this before. The lightweight edges are much faster and easier 
to traverse. In fact, I am finding that the SQL syntax such as:

  out('xxxx') 

only works when Edges have class labels which I think it only happens with 
lightweight edges.
Surely, I can use the following SQL to traverse:

select expand(in) from ( traverse * from #10:0) where @class='isA'

But the above is not as efficient as:

traverse out('isA') from #10:0

I am still a bit confused by how the BatchInser works. When I create an 
edge which extends the E using the SQL and with properties, it creates the 
new Edge and it has a label.
But when BatchInsert creates the edge with the class, it does not get a 
Label. Can you point me to what might be the problem?
here is the code that creates the Edge in the OGraphBatchInsert class:


public void createEdge(final Long from, final Long to, Map<String, Object> 
properties) {  if (settingProperties) {  throw new 
IllegalStateException("Cannot 
create new edges when already set properties on vertices");  }  if (from < 0) 
{  throw new IllegalArgumentException(" Invalid vertex id: " + from);  }  if 
(to < 0) {  throw new IllegalArgumentException(" Invalid vertex id: " + to);  
}  if (useLightWeigthEdges && (properties == null || properties.size() == 0)) 
{  last = last < from ? from : last;  last = last < to ? to : last;  
putInList(from, 
out, to);  putInList(to, in, from);  } else {  ODocument edgeDoc = new 
ODocument(edgeClass);  
  edgeDoc.fromMap(properties);  edgeDoc.field("out", new 
ORecordId(getClusterId(from), 
getClusterPosition(from)));  edgeDoc.field("in", new 
ORecordId(getClusterId(to), 
getClusterPosition(to)));  db.save(edgeDoc);  ORecordId rid = (ORecordId) 
edgeDoc.getIdentity();  putInList(from, out, rid);  putInList(to, in, rid);  
}  }

How do I open the issue? Where do I go for this?

On Friday, December 12, 2014 5:45:31 AM UTC-5, Lvc@ wrote:
>
> Hi Emin,
> That API is quite raw. I know Luigi is working to extend it, but this is 
> not a so high priority now (we're under release of 2.0rc1).
>
> Please could you open a new issue on that?
>
> Lvc@
>
>
> On 12 December 2014 at 03:52, Emin Agassi <[email protected] 
> <javascript:>> wrote:
>
>>
>>  I found a setEdgeClass method in the OGraphBatchInsert class which 
>> allows to set the class name for all edges.However, I need to be able to 
>> set different classes for different edges.
>>  I am passing a @class property to the addEdge method but this does not 
>> work.
>>  Can anyone help?
>>
>>
>> On Thursday, December 11, 2014 10:09:22 AM UTC-5, Emin Agassi wrote:
>>>
>>> Hi Luca,
>>>
>>> The OGraphBatchInsert class contains a createEdge method which does not 
>>> allow to create an Edge with a default label set.
>>> Is there a method to provide a default label for the E edges?
>>>
>>> I do not want to create any additional properties on the Edges that I am 
>>> creating.
>>> Default labels on the Edges allows very easy edge traversals.
>>>
>>> Thanks
>>>
>>  -- 
>>
>> --- 
>> 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] <javascript:>.
>> 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