Find entities with different cardinality/many values


#1

Hi all, I’m trying to add a condition to a Datalog query that would limit the results to the case where a certain cardinality/many attribute has different values.

Here are some of the forms I’ve tried, with no success:

[?ourEntity :event/participants ?ourTeams]
[?sourceEntity :event/participants ?sourceTeams]
(not [(= ?ourTeams ?sourceTeams)])

[?ourEntity :event/participants ?ourTeams]
[?sourceEntity :event/participants ?sourceTeams]
[(!= ?ourTeams ?sourceTeams)]

[?ourEntity :event/participants ?ourTeams]
[?sourceEntity :event/participants ?sourceTeams]
(not [(.equals ^java.util.Set ?ourTeams ?sourceTeams)])

Any ideas?
Thanks,
Chris