Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whenever you try to raname class of edges, it's objects looses their chain of inheritance. #3792

Closed
habi4ek opened this issue Mar 23, 2015 · 1 comment
Assignees
Labels

Comments

@habi4ek
Copy link

habi4ek commented Mar 23, 2015

create class testV1 extends V
Class created successfully. Total classes in database now: 12

create class testV2 extends V
Class created successfully. Total classes in database now: 13

insert into testV1 CONTENT {"name":"vertex1"}
Inserted record 'testV1#12:0{name:vertex1} v1' in 0,069000 sec(s).

insert into testV2 CONTENT {"name":"vertex2"}
Inserted record 'testV2#13:0{name:vertex2} v1' in 0,055000 sec(s).

create class edgeClass extends E
Class created successfully. Total classes in database now: 14

create class oldNameEdge extends edgeClass
Class created successfully. Total classes in database now: 15

create edge oldNameEdge from #12:0 to #13:0
Created edge '[oldNameEdge#15:0{out:#12:0,in:#13:0} v3]' in 0,067000 sec(s).

test query

select expand(outE('E')) from #12:0

----+-----+-----------+-----+-----

|@Rid |@Class |out |in

----+-----+-----------+-----+-----
0 |#15:0|oldNameEdge|#12:0|#13:0
----+-----+-----------+-----+-----
1 item(s) found. Query executed in 0.057 sec(s).

rename class "oldNameEdge"

alter class oldNameEdge name newNameEdge
Class updated successfully

test query againe

select expand(outE('E')) from #12:0
0 item(s) found. Query executed in 0.056 sec(s).

but

select expand(outE()) from #12:0
----+-----+-----------+-----+-----

|@Rid |@Class |out |in

----+-----+-----------+-----+-----
0 |#15:0|newNameEdge|#12:0|#13:0
----+-----+-----------+-----+-----
1 item(s) found. Query executed in 0.057 sec(s).

create new edge in renamed class

create edge newNameEdge from #12:0 to #13:0
Created edge '[newNameEdge#15:1{out:#12:0,in:#13:0} v3]' in 0,058000 sec(s).

test query againe

select expand(outE('E')) from #12:0
----+-----+-----------+-----+-----

|@Rid |@Class |out |in

----+-----+-----------+-----+-----
0 |#15:1|newNameEdge|#12:0|#13:0
----+-----+-----------+-----+-----
1 item(s) found. Query executed in 0.056 sec(s).

but

select expand(outE()) from #12:0
----+-----+-----------+-----+-----

|@Rid |@Class |out |in

----+-----+-----------+-----+-----
0 |#15:0|newNameEdge|#12:0|#13:0
1 |#15:1|newNameEdge|#12:0|#13:0
----+-----+-----------+-----+-----
2 item(s) found. Query executed in 0.056 sec(s).

but

select expand(outE('oldNameEdge')) from #12:0
----+-----+-----------+-----+-----

|@Rid |@Class |out |in

----+-----+-----------+-----+-----
0 |#15:0|newNameEdge|#12:0|#13:0
----+-----+-----------+-----+-----
1 item(s) found. Query executed in 0.057 sec(s).

but

select from oldNameEdge
Error: com.orientechnologies.orient.core.exception.OQueryParsingException: Error on parsing query
Query: oldNameEdge
------^
Error: com.orientechnologies.orient.core.exception.OCommandExecutionException: Class 'OLDNAMEEDGE' w
as not found in current database

@lvca lvca added this to the 2.0.6 milestone Mar 25, 2015
@lvca lvca added the bug label Mar 25, 2015
@tglman
Copy link
Member

tglman commented Mar 26, 2015

Hi, this is a bug in 2.0.6 but is already fixed in 2.1, so i'm closing it. reopen it if you need this to back ported.

@tglman tglman closed this as completed Mar 26, 2015
@tglman tglman added the wontfix label Mar 26, 2015
@lvca lvca modified the milestone: 2.0.6 Aug 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants