Fix getRelationRecords for compound relation