Hello,

Then i create following database

CREATE CLASS Widget EXTENDS V
CREATE PROPERTY Widget.Name STRING
CREATE PROPERTY Widget.out_VersionOf LINKSET


CREATE CLASS WidgetVersion EXTENDS V
CREATE PROPERTY WidgetVersion.Version INTEGER
CREATE PROPERTY WidgetVersion.in_VersionOf LINKSET


CREATE CLASS VersionOf EXTENDS E


CREATE VERTEX Widget SET Name='Widget 1'
CREATE VERTEX Widget SET Name='Widget 2'
CREATE VERTEX Widget SET Name='Widget 3', out_VersionOf={}


CREATE VERTEX WidgetVersion SET Version=1
CREATE VERTEX WidgetVersion SET Version=2
CREATE VERTEX WidgetVersion SET Version=3, in_VersionOf={}



*INFO CLASS Widget*

Class................: Widget
Super class..........: V
Default cluster......: widget (id=12)
Supported cluster ids: [12]
Cluster selection....: round-robin
PROPERTIES
------------------------------------+----------------+-----------------------------------+----------------------+------------------+-----------------+-----------+-----------+----------------+
 NAME                          | TYPE        | LINKED TYPE/CLASS  | 
MANDATORY | READONLY | NOT NULL |    MIN  |    MAX | COLLATE  |
------------------------------------+----------------+-------------------- 
 
-------------+----------------------+------------------+-----------------+-----------+-----------+----------------+
 Name                           | STRING    | null                         
     | false                | false           | false          |           
 |             | default      |
 out_VersionOf               | LINKSET  | null                             
 | false                | false           | false          |            |   
          | default      |
------------------------------------+----------------+----------------------------------+-----------------------+------------------+-----------------+-----------+-----------+----------------+

SELECT FROM Widget


----+--------+-------------+------------+----------------------
#   |@RID |@CLASS|Name     |out_VersionOf
----+--------+-------------+------------+----------------------
0   |#12:0 |Widget    |Widget 1 |null
1   |#12:1 |Widget    |Widget 2 |null
2   |#12:2 |Widget    |Widget 3 |[0]
----+--------+-------------+------------+---------------------

INFO CLASS WidgetVersion


Class................: WidgetVersion
Super class..........: V
Default cluster......: widgetversion (id=13)
Supported cluster ids: [13]
Cluster selection....: round-robin
PROPERTIES
------------------------------------+----------------+-----------------------------------+----------------------+------------------+-----------------+-----------+-----------+----------------+
 NAME                          | TYPE        | LINKED TYPE/CLASS  | 
MANDATORY | READONLY | NOT NULL |    MIN  |    MAX | COLLATE  |
------------------------------------+----------------+-------------------- 
 
-------------+----------------------+------------------+-----------------+-----------+-----------+----------------+
 Version                         | STRING    | null                         
     | false                | false           | false          |           
 |             | default      |
 in_VersionOf                 | LINKSET  | null                             
 | false                | false           | false          |            |   
          | default      |
------------------------------------+----------------+----------------------------------+-----------------------+------------------+-----------------+-----------+-----------+----------------+

SELECT FROM WidgetVersion



----+---------+---------------------+------------+--------------------
#   |@RID |@CLASS         |Version  |in_VersionOf
----+---------+---------------------+------------+--------------------
0   |#13:0  |WidgetVersion |1            |null
1   |#13:1  |WidgetVersion |2            |null
2   |#13:2  |WidgetVersion |3            |[0]
----+---------+---------------------+------------+-------------------

-- All setup is done lets create some edges

CREATE EDGE VersionOf FROM #12:0 TO #13:0 


Error: 
com.orientechnologies.orient.core.exception.OCommandExecutionException: 
Error on execution of command: sql.create EDGE VersionOf FROM #12:0 TO #13:0

Error: java.lang.IllegalStateException: Type of field provided in schema 
'LINKSET can not be used for link creation.

CREATE EDGE VersionOf FROM #12:2 TO #13:2


Created edge '[VersionOf#14:0{out:#12:2,in:#13:2} v3]' in 0.006000 sec(s).

-- 

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