Search code examples
sqlorientdbon-duplicate-key

How to avoid duplicate inserts for an OrientDB database?


In SQL there's a query INSERT IGNORE which keeps duplicate entries out of the database based on the primary key. But is there a way to achieve this functionality in OrientDB since the primary key concept here is kind of achieved using the @rid concept?


Solution

  • I think you can use a unique index on that class, so you can avoid duplicate entries.