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

Unable to create edges between edges in OrientDB 2.0.8 (which was possible in 2.0.6) #4078

Closed
nagarajasr opened this issue May 4, 2015 · 4 comments
Assignees
Labels

Comments

@nagarajasr
Copy link
Contributor

In OrientDB 2.0.6, it was possible to create an edge between two edges. However, the fix to issue #2796, provided by the commit 3b39ef6 seems to have inadvertently broken this 'feature'.

in 2.0.6:

create class V1 extends V
create class E1 extends E
create vertex V1 (gives #11:0)
create vertex V1 (gives #11:1)
create edge E1 from #11:0 to #11:1 (gives #12:1)
create edge E1 from #11:0 to #11:2 (gives #12:2)
create edge E1 from #12:1 to #12:2
Created edge '[E1#12:3{out:#12:1,in:#12:2} v3]' in 0.036000 sec(s)

However, in 2.0.8, the last statement throws an IllegalArgumentException:

Error: com.orientechnologies.orient.core.exception.OCommandExecutionException: Error on execution of command: sql.create edge E1 from #24:0 to #24:1

Error: java.lang.IllegalArgumentException: Class 'E1' is not an instance of V

We would like to have the feature restored so that it may be possible to create edges between edges.

@lvca
Copy link
Member

lvca commented May 4, 2015

What's the meaning on creating edges between edges?

@lvca lvca self-assigned this May 4, 2015
@nagarajasr
Copy link
Contributor Author

I would like to create an edge where the source and destination are themselves edges (instead of vertices). As described above, the statement "create edge E1 from #12:1 to #12:2" is trying to create an edge where #12:1 and #12:2 are themselves edges.

Let me try to describe my use case why I would need this 'feature'. In my domain model for a network, I have represented a circuit (which I call as parent circuit) between two ports as an edge in OrientDB. This circuit provides a certain capacity (or bandwidth). I need to divide this circuit capacity into smaller circuits (called child circuits) which may be allocated to different customers. I need to represent a relationship, the child circuit "depends on" the parent circuit. This requires to be able to create an edge between parent and child circuit, which are themselves edges. Note that this circuit hierarchy can run many levels deep.

@lvca
Copy link
Member

lvca commented May 4, 2015

Edges against edges is out of Property Graph definition. In your domain you could simply create a new vertex of class "subgraph" and connect them using this vertex.

@emg110
Copy link

emg110 commented Dec 10, 2017

Dear friends, dear lvca :
The type of graph in which edges can have edges with edges is actually called : "Hyper Graph".
Those edges who connect the edges only are called "Hyper Edges".
The hyper graph is a proven and widely used extension to original Graph theory and recent network theory to follow. If i may i would suggest to include (reinclude) the feature as an extra feature named HYPERGRAPH to be enabled or disabled per database in run time.

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