UPSERT without UNIQUE Index?

In 2.2.x, it is possible to do an UPSERT on a Vertex that doesn’t have a UNIQUE index (I’ve tested it, and it works fine). Of course you have to understand what the ramifications of this are, but as long as all UPDATEs are done with the UPSERT, it ultimately has the same effect as doing it with a UNIQUE index. And there are good use-cases for this approach, so I’m glad ODB allows it.

There is a new feature in 3.0.1 that allows an UPSERT on an Edge. In the github issue, it says that the Edge must have a UNIQUE index, and that this is enforced. If so, I would like to suggest that it not be enforced. It should be left to the developer to understand what the implications are of a particular design choice. In this case, the lack of a UNIQUE index on an Edge does not crash ODB. It may not work “as expected”, but that should be left for the developer to decide.