Sorry I was talking about CLASSES command.

The point is the following.

Under the hood lightweight edges ARE NOT instances of a class.
When I created my database from Java API, I didn't create any class for my
edges.

I need to create e new edge from command line.

1) I am forced to add a new class, while for all the previous edges I
didn't have to do this (also if there are already other edges with the same
label) => this is somehow *inconsistent*, since it means at the end I will
have some lightweight edges for which there exists a class and others
without!
2) The new created class will remain empty, since a new edge isn't a new
record => this means the new class I created is *unuseful*

I don't remember exactly if there can be a mixed model graphdb (with
lightweight AND non-lightweight edges) but I would suggest the following
behaviour for ADD EDGE myLabel FROM #1:1 TO #1:2:

   - IF myLabel extends E AND non-lightweight THEN as usual
   - IF myLabel IS NOT A CLASS AND lightweight THEN add the lightweight edge

It would also be very useful a command to list all the edge types, which is
different from listing all the classes extending E. I don't know if this
requires to scan all records or a list of lightweight edges is maintained
elsewhere.

My two cents,
  Riccardo

2014-11-26 8:22 GMT+01:00 Riccardo Tasso <[email protected]>:

> Thank you Luigi,
> in this case is there a command to list all the existing "classes"
> extending E?
> The command CLASS doesn't list lightweight edges, since they're not real
> classes.
>
> Cheers,
>    Riccardo
>
> 2014-11-25 18:27 GMT+01:00 Luigi Dell'Aquila <[email protected]>:
>
>> Hi Riccardo,
>>
>> what TinkerPop calls labels is represented by OrientDB classes.
>> You can create a lightweight edge of a particular class with this syntax:
>>
>> CREATE EDGE MyLabel FROM #14:1 TO #14:0
>>
>> Of course the class MyLabel has to exist and has to extend E
>>
>> If you use the SET labelName = value, the labelName will become a
>> property of the edge, so the edge will become a regular one (not
>> lightweight)
>>
>> Luigi
>>
>>
>>
>> 2014-11-25 18:21 GMT+01:00 Riccardo Tasso <[email protected]>:
>>
>>> Hi, if I tried the following command:
>>> CREATE EDGE FROM #14:1 TO #14:0 SET @label="myLabel"
>>> But it seems to create a new record in class E.
>>> What if I would create a new lightweight edge from command line?
>>>
>>> I'm using orient 1.7.10.
>>>
>>> Cheers,
>>>    Riccardo
>>>
>>> --
>>>
>>> ---
>>> 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