You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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)
The text was updated successfully, but these errors were encountered: