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

Where clause not working in deleting records selected with subquery #6174

Closed
1 task done
zella opened this issue May 20, 2016 · 3 comments
Closed
1 task done

Where clause not working in deleting records selected with subquery #6174

zella opened this issue May 20, 2016 · 3 comments
Assignees
Labels

Comments

@zella
Copy link

zella commented May 20, 2016

Expected behavior and actual behavior

I try to delete record selected with subquery, but 'WHERE' clause not working, it's ignores, all records removes instead:
delete from (select expand(accounts) from #30:0) where type = 'test2' - removes all accounts from #30:0,

However same with select: where working
select from (select expand(accounts) from #30:0) where type = 'test2'

Steps to reproduce the problem

CREATE CLASS Account
CREATE CLASS Profile
CREATE PROPERTY Profile.accounts LINKLIST
Insert into Account set type = 'test1'
Insert into Account set type = 'test2'
Insert into Account set type = 'test3'
Insert into Profile set accounts = [#29:0,#29:1]   //29 - account cluster, change yours

delete from (select expand(accounts) from #30:0) where type = 'test2'  //30 - profile cluster, change yours
select from Account  // #29:0  and #29:1 not exist
select from Profile // accounts is [null,"#29:1"] in studio

Important Questions

Runninng Mode

  • Remote

OrientDB Version

  • [x ] v2.1.x - Please specify last number: 2.1.17

Operating System

  • [ x] Linux ubuntu 14

Java Version

  • [ x] 8
@zella zella changed the title Where clause not working in deleting links selected with subquery Where clause not working in deleting records selected with subquery May 20, 2016
@wolf4ood wolf4ood added the bug label May 20, 2016
@zella
Copy link
Author

zella commented May 20, 2016

missprint, sorry: 2.1.17

luigidellaquila added a commit that referenced this issue May 23, 2016
the WHERE condition was ignored

Resolves: #6174
@luigidellaquila
Copy link
Member

Just pushed a fix on 2.1.x, the fix will be available in 2.1.18.

Now I'm porting it to 2.2

Thanks

Luigi

luigidellaquila added a commit that referenced this issue May 23, 2016
the WHERE condition was ignored

Resolves: #6174
@luigidellaquila
Copy link
Member

Pushed on 2.2 as well, the fix will be released with 2.2.1 hotfix

Closing, 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

3 participants