orientechnologies / orientjs

The official fast, lightweight node.js client for OrientDB
http://orientdb.com
Other
326 stars 67 forks source link

session.index.create ignores ifnotexist #418

Closed Aeonrush closed 4 years ago

Aeonrush commented 4 years ago

Hi OrientDB Docker image tag: 3.0.25 Orientjs: 3.0.8

Example

const session = await pool.acquire();
session.index.create({
  name: 'User._username',
  class: 'User',
  type: 'UNIQUE',
  properties: ['username'],
  ifnotexist: true
})

I'm getting an Error

  throw e;
  ^
OrientDB.RequestError: Index User._username already exists