Closed machinelearner closed 10 years ago
What release?
Sorry forgot to mention.
1.7.6
Reproduced! Working to fix it.
I'm wrong, sorry. I'm not able to reproduce it. Can you write also the steps to create the graph, not only the schema?
I've tried to create database and schema in various different ways.
using tinkerpop graph
graph = new OrientGraph("local:localhost/userNetwork")
console
create database 'remote:localhost/userNetwork' root root plocal graph
Both local and remote
I think the cause for this is the use of LINKSET in edge schema. Currently as a workaround i've changed to a less strict schema (LINK) and things dont seem to break
Where did you set LINKSET in schema?
On 16 August 2014 11:46, Pramod N notifications@github.com wrote:
I've tried to create database and schema in various different ways. using tinkerpop graph graph = new OrientGraph("local:localhost/userNetwork")
console create database 'remote:localhost/userNetwork' root root plocal graph
Both local and remote
I think the cause for this is the use of LINKSET in edge schema. Currently as a workaround i've changed to a less strict schema (LINK) and things dont seem to break
— Reply to this email directly or view it on GitHub https://github.com/orientechnologies/orientdb/issues/2682#issuecomment-52388882 .
in property of the custom edge
create property BelongsTo.in LINKSET Group
OK, so this isn't a bug. EDGE can't be hyperedge.
Oohh, damn! so the normalised view(which i called work around) is the actual solution. Cool. Thanks for responding.
Example query via Gremlin
new GremlinPipeline<>().start(groupVertex).in("BelongsTo").has("_id", Contains.IN, memberIds).remove();
Stack Trace: java.lang.ClassCastException: com.orientechnologies.orient.core.type.tree.OMVRBTreeRIDSet cannot be cast to com.orientechnologies.orient.core.db.record.OIdentifiable at com.tinkerpop.blueprints.impls.orient.OrientEdge.getConnection(OrientEdge.java:66) at com.tinkerpop.blueprints.impls.orient.OrientVertex.removeInverseEdge(OrientVertex.java:370) at com.tinkerpop.blueprints.impls.orient.OrientVertex.removeEdges(OrientVertex.java:227) at com.tinkerpop.blueprints.impls.orient.OrientVertex.remove(OrientVertex.java:571) at com.tinkerpop.gremlin.java.GremlinPipeline.remove(GremlinPipeline.java:1608)
Schema for Group, User and Belongs To: ` Create class Subject extends V ABSTRACT ; Create property subject._id STRING ; alter property subject._id NOTNULL true
Create class User extends Subject ; Create property user.name STRING
Create class Group extends Subject ; Create property user.name STRING
Create class BelongsTo extends E ; create property BelongsTo.out LINK Subject ; create property BelongsTo.in LINKSET Group ; alter property BelongsTo.out MANDATORY=true ; alter property BelongsTo.in MANDATORY=true ; create index UniqueBelongsTo on BelongsTo(out,in) unique" `