Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CREATE INDEX doesn't automatically bound index to the schema property in v3.0.0 #8268

Closed
dastoori opened this issue May 17, 2018 · 2 comments
Assignees
Labels
Milestone

Comments

@dastoori
Copy link

OrientDB Version: v3.0.0

Java Version: 9.0.1

OS: MacOS

Expected behavior

CREATE INDEX should automatically bound index to a property using index name:

CREATE INDEX User.id UNIQUE    /* throws error */ 

CREATE INDEX User.id ON User (id) UNIQUE    /* working */ 

Actual behavior

It throws this error:

com.orientechnologies.orient.core.exception.ODatabaseException: Impossible to create an index without specify the key type or the associated property: CREATE INDEX User.id UNIQUE 

Steps to reproduce

Run these commands (from https://orientdb.com/docs/3.0.x/sql/SQL-Create-Index.html):

CREATE PROPERTY User.id BINARY
CREATE INDEX User.id UNIQUE
@luigidellaquila
Copy link
Member

Hi @dastoori

That syntax will be deprecated soon, it's there only for backward compatibility in the legacy SQL executor. Please use the full syntax.
Anyway, I'll give it a look, probably it's an easy fix

Thanks

Luigi

@luigidellaquila luigidellaquila self-assigned this May 17, 2018
@luigidellaquila luigidellaquila added this to the 3.0.2 milestone May 21, 2018
@luigidellaquila
Copy link
Member

Hi @dastoori

I just pushed a fix for this, it will be released with v 3.0.2

Thanks

Luigi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants