I have three objects, the Professional_Experience__c, Assignment__c, and Project__c. Professional Experience has two child (Assignment__c, and Project__c). Then the Assignment__c has also a child (Project__c).
public class profExpWrapper{
public Id peId {get;set;}
public Professional_Experience__c peWrap {get;set;}
public List<Project__c> projWrap {get;set;} //list of standalone project
public List<assignmentWrapper> assignmentListWrapper1 {get;set;} //list of assignmentWrapper
}
public class assignmentWrapper{
public Id assignmentId {get;set;}
public Assignment__c assignmentWrap {get;set;}
public List<Project__c> projectforassignmentWrap {get;set;} //list of project per assignment
}
I want to compare the record of Assignment__c and Project__c thru date fields so that if the Assignment record is more recent, it will show first. So that when I go to Professional_Experience__c record, the 2 child will be arranged / sort by the date field. How can I achieve this using comparable?