Reputation: 532
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?
Upvotes: 0
Views: 675
Reputation: 9060
Have you tried the UPSERT?
UPDATE Profile SET nick = 'Luca' UPSERT WHERE nick = 'Luca'
Please create an index against "nick" property.
Upvotes: 1
Reputation: 3570
I think you can use a unique index on that class, so you can avoid duplicate entries.
Upvotes: 1