Open derroman opened 3 years ago
Fun fact: when I change the parameter from Set to List it works smoothly.
public with sharing class AccountTeamMemberRepository extends SObjectRepository {
public override SObjectType getSObjectType() {
return Schema.AccountTeamMember.SObjectType;
}
//changed from Set to List
public List<AccountTeamMember> getAccountTeamMembersByAccountIds(List<Id> accountIds) {
return new SObjectQueryBuilder(this.getSObjectType())
.addAllFields()
.filterBy(new QueryFilter().filterByField(new QueryField(Schema.AccountTeamMember.AccountId), QueryOperator.IS_IN, accountIds))
.getQueryResults();
}
}
Based on this comment by @jamessimone here https://github.com/jamessimone/apex-dml-mocking/issues/1#issuecomment-764743723 and here https://github.com/jamessimone/apex-dml-mocking/blob/384ce721fc1ef46c251e590b7b2fd521dc81d9d6/force-app/repository/Query.cls#L100 I assume Sets in apex are kind of difficult to handle?! ;-)
Hi @jongpie and @jamessimone
Similar to the issue mentioned over here: https://github.com/jamessimone/apex-dml-mocking/issues/2 (which has been fixed by @jamessimone ) I discover the same issue also in this framework (which is pretty cool by the way)
So, in my scenario I do a query on account team member by providing a huge list of account ids
I've created a small Repository which has a single method:
When I run this in Anonymous Apex with a set of more than 12 account Ids, I get an error
When I debug the query right before execution we can clearly see, that the last "entry" is just some dots, and most of the Ids are missing
mhh... ?! :-(