Remove edges while deleting a vertex

113 views
Skip to first unread message

Munish Chopra

unread,
May 6, 2014, 8:04:03 AM5/6/14
to orient-...@googlegroups.com
Hi,

I am using orinetdb 1.7-rc2 and need some information about cleanup of edges. I have a user and group vertex and using an edge to link users with the group.

I am creating user as 
insert into user set name = 'test'

and similarly group as
insert into group set name = 'test_group'

Now if a user wants be a part of group, I am using an edge to link them

create edge userIngroup from user to group;


My edge has following properties as, I dont't want multiple edges between same vertexes

'CREATE PROPERTY UserInGroup.in LINK Group',
'CREATE PROPERTY UserInGroup.out LINK User',
'ALTER property UserInGroup.out MANDATORY=true',
'ALTER property UserInGroup.in MANDATORY=true',
'CREATE INDEX UniqueUserInGroup on UserInGroup(out, in) UNIQUE',


Now if I delete a vertex either by using "delete from" or "delete vertex", it does not remove the edge.
Lets say I executed
delete vertex user where name = 'test'

The edge still remains but if I execute
select expand(in('UserIngroup')) from group

It gives an error.

SEVE Internal server error:

java.lang.NullPointerException [ONetworkProtocolHttpDb]

How can I remove all the edges when a vertex is deleted. Can this be handled through orinentdb


P.S: I am using Orientdb REST API to execute these sql

Regards,
Munish

Munish Chopra

unread,
May 6, 2014, 8:05:44 AM5/6/14
to orient-...@googlegroups.com
To add into this, This works fine if I work through Orinetdb Studio but create problem through REST API Only. 

Are these API's not upgraded ?

Thanks in advance

~Munish

Luca Garulli

unread,
May 6, 2014, 9:22:10 AM5/6/14
to orient-database
Do the class user and group extend V ?

Lvc@


--

---
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 orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Munish Chopra

unread,
May 6, 2014, 10:34:50 AM5/6/14
to orient-...@googlegroups.com
Hi Luca,

Thanks for the reply.

Yes Class Group and User extends V and edge UserInGroup extends E

Regards,
Munish

Luca Garulli

unread,
May 6, 2014, 10:36:21 AM5/6/14
to orient-database
Hi Munish,
may you try with 1.7-SNAPSHOT to understand if the bug has been already fixed?

Thanks,
Lvc@


--

alexander anguiano

unread,
May 16, 2014, 10:28:17 AM5/16/14
to orient-...@googlegroups.com
So, is this fixed?  

Munish Chopra

unread,
May 19, 2014, 6:48:18 AM5/19/14
to orient-...@googlegroups.com
Hi Luca,

Nope, I am still trying to make it work. If I have soft edges, this works fine. But create problem with concrete edges.

Regards,
Munish


--

---
You received this message because you are subscribed to a topic in the Google Groups "OrientDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orient-database/2-3ql9FLAcg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orient-databa...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Regards,
Manish
Reply all
Reply to author
Forward
0 new messages