Ben
Ben

Reputation: 1581

Can't query edges in OrientDB anymore

When I try to query:

select out('teaches') from Course

OrientDB returns empty lists, while the edges that I'm trying to find do exist.

Also, in the graph editor, the edges options won't show up anymore:

Normally, I can choose edges by hovering over the arrows. Now it doesn't do anything.

I've noticed that this started to happen when I started indexing my edges with a unique hash key. Does this have anything to do with it?

I'm using OrientDB version 2.0.5.

Upvotes: 0

Views: 152

Answers (1)

Ben
Ben

Reputation: 1581

Apparently, it didn't work because I was using an UPDATE command.

UPDATE teaches SET in = #12:1, out = #13:1 UPSERT WHERE in = #12:1 AND out = #13:1 will create the edge (record) if it does not yet exist, but you won't be able to query it.

CREATE EDGE teaches from #13:1 to #12:1 does work and you will be able to query it.

Not sure whether this can be considered a bug...

Upvotes: 2

Related Questions