OK, I am trying to think of the best way of doing this, and all of the solutions seem over complicated... I'm missing something simple and I don't know what. Can someone please help me with a simple solution/best practice for this?
I have two objects that I want to check for conflict. I want to remove all of the items that may have a conflict. This is my code for so far.
List<junction__c> junc = [SELECT Id, obj2__c FROM junction__c WHERE anotherObj__c = :anotherID AND Start_Date_and_Time__c >= : Start AND Start_Date_and_Time__c <= : Finish AND Finish_Date_and_Time__c >= : Start AND Finish_Date_and_Time__c <= : Finish ]; List<obj2__c> obj2__c [SELECT Id, Name FROM obj2__c WHERE anotherObj__c = : anotherID ];
How would I return all of the second list (obj2__c) that were not found in the first list?