you might want to try adding the 'unsafe' predicate to the delete edge 
command.
I have seen somewhat similar behaviour (though i don't recall the exact 
error message) when i tried to delete the vertex directly by giving the 
@rid (delete #14:0) instead of using the delete vertex command.
using the delete vertex command deletes any connected edges but if the 
record is deleted using delete @rid unsafe, it leaves the edges hanging 
around.
after that, the only way to get rid of the hanging edge (no pun intended) 
is to use delete @rid unsafe on the edge
in general, always use the delete vertex or delete edge commands and avoid 
using unsafe keyword.


On Monday, April 20, 2015 at 7:05:13 PM UTC+5:30, Esen Sagynov wrote:
>
> delete edge Permissions where @rid = #15:1
>
> Returns the same error:
>
> java.lang.ClassCastException: java.lang.String cannot be cast to 
> com.orientechnologies.orient.core.db.record.OIdentifiable
>
> When I try to delete the edge from the Edit view, it shows another error:
>
> java.lang.IllegalArgumentException: The document received is not a Vertex. 
> Found class 'Permissions'
>
> Then I check if I have vertices this edge connects to and see that I have 
> no vertices. They were deleted, but if they were why does the edge still 
> exist and point to these non-existing vertices?
>
> On Monday, April 20, 2015 at 12:09:37 PM UTC+9, nagaraja sosale ramaswamy 
> wrote:
>>
>> this ought to work:
>>
>> delete edge Permissions where @rid = #15:1
>>
>> the record id should not be enclosed in quotes. explains why you are 
>> getting a class cast exception.
>>
>>
>> On Sunday, April 19, 2015 at 2:54:05 PM UTC+5:30, Esen Sagynov wrote:
>>>
>>> delete edge Permissions where @rid = '#15:1'
>>>
>>> Why doesn't it work? I can't delete this edge in the Studio. It shows 
>>> the following error:
>>>
>>> java.lang.ClassCastException: java.lang.String cannot be cast to 
>>> com.orientechnologies.orient.core.db.record.OIdentifiable
>>>
>>> I can't do either:
>>>
>>> delete edge #15:1
>>>
>>> It shows the same error. I also cannot do:
>>>
>>> delete edge '#15:1'
>>>
>>> Which shows the following error:
>>>
>>> com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error 
>>> on parsing command at position #0: Class ''#15:1' was not found
>>>
>>> When I browse it, I see this edge still exists:
>>> select * from Permissions
>>> select * from Permissions
>>> METADATAPROPERTIES
>>> @rid
>>> @version
>>> @class
>>> out
>>> in
>>> #15:1 
>>> <http://localhost:2480/studio/index.html#/database/pms/browse/edit/15:1>
>>> 3Permissions#14:2 
>>> <http://localhost:2480/studio/index.html#/database/pms/browse/edit/14:2>
>>> #13:0 
>>> <http://localhost:2480/studio/index.html#/database/pms/browse/edit/13:0>
>>> #15:2 
>>> <http://localhost:2480/studio/index.html#/database/pms/browse/edit/15:2>
>>> 2Permissions#14:1 
>>> <http://localhost:2480/studio/index.html#/database/pms/browse/edit/14:1>
>>> #14:2 
>>> <http://localhost:2480/studio/index.html#/database/pms/browse/edit/14:2>
>>> #15:3 
>>> <http://localhost:2480/studio/index.html#/database/pms/browse/edit/15:3>
>>> 7Permissions#14:2 
>>> <http://localhost:2480/studio/index.html#/database/pms/browse/edit/14:2>
>>> #13:0 
>>> <http://localhost:2480/studio/index.html#/database/pms/browse/edit/13:0>
>>> 10255010010005000
>>>
>>>    
>>> Am I doing something wrong?
>>>
>>> I'm using ODB 2.1 RC1.
>>>
>>

-- 

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

Reply via email to