I’m creating an application similar to Tinder. It goes along these lines…
I have a “dates” table with a “likers” column which is a One to Many relationship with my Users table.
The idea is to record which users have already liked a “date” object by adding the User object to the likers column.
I want to be able to search for all date objects where my current user Id is NOT in the likers column of that date. Unfortunately the not equals operator does not work.
likers.objectId = ‘401D19CB-25F6-1806-FF39-4C85BCAFC500’ - this works. If the users object is in the likers column amongst multiple other user IDs, it will return that date object. If I remove the users Id from the likers column, the date object is not returned - this is as expected…
If I do the same using likers.objectId != ‘401D19CB-25F6-1806-FF39-4C85BCAFC500’ - this does not work. It will ONLY work if there is one User object in the Likers column. If there is more than one user object it fails to exclude the date object containing that user ID and just returns it regardless ignoring the not equal to operator.
Is there a different approach to what I’m trying to achieve? Your help would be much appreciated.
Please find attached screenshots.