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

OrientDB 2.1.2: intersect() does not work #4991

Closed
doppelrittberger opened this issue Sep 21, 2015 · 1 comment
Closed

OrientDB 2.1.2: intersect() does not work #4991

doppelrittberger opened this issue Sep 21, 2015 · 1 comment
Assignees
Labels
Milestone

Comments

@doppelrittberger
Copy link

Hi,

I have the following data structure:

Client
-> users: List
User
-> emailAddresses: List
EmailAddress:
-> email: String

Now I want to detect, if an email address is already included in a client if I add a new user to the client (e.g. client contains user 1 and user 2, user 1 contains email "test@test.de", user 2 contains "test2@test.de", if I want to add user 3 containing also email "test@test.de" I want to reject in my code).
So far I realized my query this way (#18:2 is a client, #12:1 is the new user to add, I just expand all existing email addresses from the client and want to get the union to all new users email addresses):

SELECT expand($c) LET $a = (SELECT expand(emailAddresses) FROM (SELECT expand(users) FROM #18:2)), $b = (SELECT expand(emailAddresses) FROM #12:1), $c = intersect($a, $b)

The intersect() doesn´t work (at least in OrientDB 2.1.2) -> throws:

java.lang.ClassCastException: com.orientechnologies.orient.core.sql.query.OResultSet cannot be cast to com.orientechnologies.common.util.OSupportsContains

(Referring to https://groups.google.com/forum/embed/?place=forum/orient-database&theme=default&fragments=true&showsearch=true&showtabs=true&hideforumtitle=true&hidesubject=true&parenturl=http%3A%2F%2Forientdb.com%2Factive-user-community%2F#!topic/orient-database/1F9onWJLzu8)

@luigidellaquila luigidellaquila added this to the 2.1.x (next hotfix) milestone Sep 21, 2015
@luigidellaquila luigidellaquila self-assigned this Sep 21, 2015
@lvca
Copy link
Member

lvca commented Oct 5, 2015

This has been already fixed in 2.1.3.

@lvca lvca closed this as completed Oct 5, 2015
@lvca lvca modified the milestones: 2.1.3, 2.1.x (next hotfix) Oct 5, 2015
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

4 participants