Hi Gordon,
Use *LINKBAG* instead of LINKSET to create edges container.

Lvc@

On 15 March 2015 at 08:19, GoorMoon <[email protected]> wrote:

> Thanks,
> I'm trying to figure out if this is a bug or expected behavior
>
>
> On Sunday, March 15, 2015 at 8:01:51 AM UTC+2, nagaraja sosale ramaswamy
> wrote:
>>
>> i'm able to reproduce the problem on 2.0.5 community.
>>
>>
>>
>> On Saturday, March 14, 2015 at 2:18:11 PM UTC+5:30, GoorMoon wrote:
>>>
>>> Checked again in orientdb 1.7.9 same problem.
>>>
>>> On Friday, March 13, 2015 at 11:30:28 PM UTC+2, Colin wrote:
>>>>
>>>> Hi,
>>>>
>>>> Which version of OrientDB are you using?
>>>>
>>>> -Colin
>>>>
>>>> Orient Technologies
>>>>
>>>> The Company behind OrientDB
>>>>
>>>> On Friday, March 13, 2015 at 5:40:27 AM UTC-5, GoorMoon wrote:
>>>>>
>>>>> 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.
>

-- 

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