Skip to main content
added 1 character in body
Source Link
Mitesh Sura
  • 699
  • 1
  • 10
  • 21

We have been using FF library for Separation of Concerns framework and it is working great. We need to add subquery to it, but running into issues. Example I am following is from this article: https://quirkyapex.com/2016/08/18/fflib-selector-layer/

public class OpportunityLineItemsSelector extends fflib_SObjectSelector {
 
   public Schema.SObjectType getSObjectType(){
      return OpportunityLineItem.sObjectType;
   }
 
   public override List<Schema.SObjectField> getSObjectFieldList(){
      return new List<Schema.SObjectField> {
         OpportunityLineItem.Id,
         OpportunityLineItem.Quantity,
         OpportunityLineItem.SalesPrice
      };
   }
 
}

public class OpportunitiesSelector extends fflib_SObjectSelector {
 
   public Schema.SObjectType getSObjectType(){
      return Opportunity.sObjectType;
   }
 
   public override List<Schema.SObjectField> getSObjectFieldList(){
      return new List<Schema.SObjectField> {
         Opportunity.Id,
         Opportunity.StageName
      };
   }
 
   public List<Opportunity> selectByIdWithLineItems(Set<Id> recordIds){
      fflib_QueryFactory query = newQueryFactory();
      query.setCondition('Id IN :recordIds');
      query.addQueryFactorySubselect( 
         new OpportunityLineItemsSelector().newQueryFactory() 
      );
      return (List<Opportunity>) Database.query( query.toSOQL() );
   }
 
}

I get compile error:

Method does not exist or incorrect signature: void addQueryFactorySubselect(fflib_QueryFactory) from the type fflib_QueryFactory at line 17 column 13

Below method does exist in "ev_SObjectSelector""fflib_SObjectSelector" class

global fflib__QueryFactoryfflib_QueryFactory addQueryFactorySubselect(fflib__QueryFactoryfflib_QueryFactory parentQueryFactory)
{
    return addQueryFactorySubselect(parentQueryFactory, true);
}

What am I missing here?

We have been using FF library for Separation of Concerns framework and it is working great. We need to add subquery to it, but running into issues. Example I am following is from this article: https://quirkyapex.com/2016/08/18/fflib-selector-layer/

public class OpportunityLineItemsSelector extends fflib_SObjectSelector {
 
   public Schema.SObjectType getSObjectType(){
      return OpportunityLineItem.sObjectType;
   }
 
   public override List<Schema.SObjectField> getSObjectFieldList(){
      return new List<Schema.SObjectField> {
         OpportunityLineItem.Id,
         OpportunityLineItem.Quantity,
         OpportunityLineItem.SalesPrice
      };
   }
 
}

public class OpportunitiesSelector extends fflib_SObjectSelector {
 
   public Schema.SObjectType getSObjectType(){
      return Opportunity.sObjectType;
   }
 
   public override List<Schema.SObjectField> getSObjectFieldList(){
      return new List<Schema.SObjectField> {
         Opportunity.Id,
         Opportunity.StageName
      };
   }
 
   public List<Opportunity> selectByIdWithLineItems(Set<Id> recordIds){
      fflib_QueryFactory query = newQueryFactory();
      query.setCondition('Id IN :recordIds');
      query.addQueryFactorySubselect( 
         new OpportunityLineItemsSelector().newQueryFactory() 
      );
      return (List<Opportunity>) Database.query( query.toSOQL() );
   }
 
}

I get compile error:

Method does not exist or incorrect signature: void addQueryFactorySubselect(fflib_QueryFactory) from the type fflib_QueryFactory at line 17 column 13

Below method does exist in "ev_SObjectSelector" class

global fflib__QueryFactory addQueryFactorySubselect(fflib__QueryFactory parentQueryFactory)
{
    return addQueryFactorySubselect(parentQueryFactory, true);
}

What am I missing here?

We have been using FF library for Separation of Concerns framework and it is working great. We need to add subquery to it, but running into issues. Example I am following is from this article: https://quirkyapex.com/2016/08/18/fflib-selector-layer/

public class OpportunityLineItemsSelector extends fflib_SObjectSelector {
 
   public Schema.SObjectType getSObjectType(){
      return OpportunityLineItem.sObjectType;
   }
 
   public override List<Schema.SObjectField> getSObjectFieldList(){
      return new List<Schema.SObjectField> {
         OpportunityLineItem.Id,
         OpportunityLineItem.Quantity,
         OpportunityLineItem.SalesPrice
      };
   }
 
}

public class OpportunitiesSelector extends fflib_SObjectSelector {
 
   public Schema.SObjectType getSObjectType(){
      return Opportunity.sObjectType;
   }
 
   public override List<Schema.SObjectField> getSObjectFieldList(){
      return new List<Schema.SObjectField> {
         Opportunity.Id,
         Opportunity.StageName
      };
   }
 
   public List<Opportunity> selectByIdWithLineItems(Set<Id> recordIds){
      fflib_QueryFactory query = newQueryFactory();
      query.setCondition('Id IN :recordIds');
      query.addQueryFactorySubselect( 
         new OpportunityLineItemsSelector().newQueryFactory() 
      );
      return (List<Opportunity>) Database.query( query.toSOQL() );
   }
 
}

I get compile error:

Method does not exist or incorrect signature: void addQueryFactorySubselect(fflib_QueryFactory) from the type fflib_QueryFactory at line 17 column 13

Below method does exist in "fflib_SObjectSelector" class

global fflib_QueryFactory addQueryFactorySubselect(fflib_QueryFactory parentQueryFactory)
{
    return addQueryFactorySubselect(parentQueryFactory, true);
}

What am I missing here?

added 8 characters in body
Source Link
Mitesh Sura
  • 699
  • 1
  • 10
  • 21

We have been using FF library for Separation of Concerns framework and it is working great. We need to add subquery to it, but running into issues. Example I am following is from this article: https://quirkyapex.com/2016/08/18/fflib-selector-layer/

public class OpportunityLineItemsSelector extends fflib_SObjectSelector {
 
   public Schema.SObjectType getSObjectType(){
      return OpportunityLineItem.sObjectType;
   }
 
   public override List<Schema.SObjectField> getSObjectFieldList(){
      return new List<Schema.SObjectField> {
         OpportunityLineItem.Id,
         OpportunityLineItem.Quantity,
         OpportunityLineItem.SalesPrice
      };
   }
 
}

public class OpportunitiesSelector extends fflib_SObjectSelector {
 
   public Schema.SObjectType getSObjectType(){
      return Opportunity.sObjectType;
   }
 
   public override List<Schema.SObjectField> getSObjectFieldList(){
      return new List<Schema.SObjectField> {
         Opportunity.Id,
         Opportunity.StageName
      };
   }
 
   public List<Opportunity> selectByIdWithLineItems(Set<Id> recordIds){
      fflib_QueryFactory query = newQueryFactory();
      query.setCondition('Id IN :recordIds');
      query.addQueryFactorySubselect( 
         new OpportunityLineItemsSelector().newQueryFactory() 
      );
      return (List<Opportunity>) Database.query( query.toSOQL() );
   }
 
}

I get compile error:

Method does not exist or incorrect signature: void addQueryFactorySubselect(ev_QueryFactoryfflib_QueryFactory) from the type ev_QueryFactoryfflib_QueryFactory at line 17 column 13

Below method does exist in "ev_SObjectSelector" class

global fflib__QueryFactory addQueryFactorySubselect(fflib__QueryFactory parentQueryFactory)
{
    return addQueryFactorySubselect(parentQueryFactory, true);
}

What am I missing here?

We have been using FF library for Separation of Concerns framework and it is working great. We need to add subquery to it, but running into issues. Example I am following is from this article: https://quirkyapex.com/2016/08/18/fflib-selector-layer/

public class OpportunityLineItemsSelector extends fflib_SObjectSelector {
 
   public Schema.SObjectType getSObjectType(){
      return OpportunityLineItem.sObjectType;
   }
 
   public override List<Schema.SObjectField> getSObjectFieldList(){
      return new List<Schema.SObjectField> {
         OpportunityLineItem.Id,
         OpportunityLineItem.Quantity,
         OpportunityLineItem.SalesPrice
      };
   }
 
}

public class OpportunitiesSelector extends fflib_SObjectSelector {
 
   public Schema.SObjectType getSObjectType(){
      return Opportunity.sObjectType;
   }
 
   public override List<Schema.SObjectField> getSObjectFieldList(){
      return new List<Schema.SObjectField> {
         Opportunity.Id,
         Opportunity.StageName
      };
   }
 
   public List<Opportunity> selectByIdWithLineItems(Set<Id> recordIds){
      fflib_QueryFactory query = newQueryFactory();
      query.setCondition('Id IN :recordIds');
      query.addQueryFactorySubselect( 
         new OpportunityLineItemsSelector().newQueryFactory() 
      );
      return (List<Opportunity>) Database.query( query.toSOQL() );
   }
 
}

I get compile error:

Method does not exist or incorrect signature: void addQueryFactorySubselect(ev_QueryFactory) from the type ev_QueryFactory at line 17 column 13

Below method does exist in "ev_SObjectSelector" class

global fflib__QueryFactory addQueryFactorySubselect(fflib__QueryFactory parentQueryFactory)
{
    return addQueryFactorySubselect(parentQueryFactory, true);
}

What am I missing here?

We have been using FF library for Separation of Concerns framework and it is working great. We need to add subquery to it, but running into issues. Example I am following is from this article: https://quirkyapex.com/2016/08/18/fflib-selector-layer/

public class OpportunityLineItemsSelector extends fflib_SObjectSelector {
 
   public Schema.SObjectType getSObjectType(){
      return OpportunityLineItem.sObjectType;
   }
 
   public override List<Schema.SObjectField> getSObjectFieldList(){
      return new List<Schema.SObjectField> {
         OpportunityLineItem.Id,
         OpportunityLineItem.Quantity,
         OpportunityLineItem.SalesPrice
      };
   }
 
}

public class OpportunitiesSelector extends fflib_SObjectSelector {
 
   public Schema.SObjectType getSObjectType(){
      return Opportunity.sObjectType;
   }
 
   public override List<Schema.SObjectField> getSObjectFieldList(){
      return new List<Schema.SObjectField> {
         Opportunity.Id,
         Opportunity.StageName
      };
   }
 
   public List<Opportunity> selectByIdWithLineItems(Set<Id> recordIds){
      fflib_QueryFactory query = newQueryFactory();
      query.setCondition('Id IN :recordIds');
      query.addQueryFactorySubselect( 
         new OpportunityLineItemsSelector().newQueryFactory() 
      );
      return (List<Opportunity>) Database.query( query.toSOQL() );
   }
 
}

I get compile error:

Method does not exist or incorrect signature: void addQueryFactorySubselect(fflib_QueryFactory) from the type fflib_QueryFactory at line 17 column 13

Below method does exist in "ev_SObjectSelector" class

global fflib__QueryFactory addQueryFactorySubselect(fflib__QueryFactory parentQueryFactory)
{
    return addQueryFactorySubselect(parentQueryFactory, true);
}

What am I missing here?

tidied up code formatting, put error into blockquote, retagged
Source Link
Derek F
  • 64.1k
  • 15
  • 55
  • 104

We have been using FF library for Separation of Concerns framework and it is working great. We need to add subquery to it, but running into issues. Example I am following is from this article: https://quirkyapex.com/2016/08/18/fflib-selector-layer/

public class OpportunityLineItemsSelector extends fflib_SObjectSelector {

public Schema.SObjectType getSObjectType(){ return OpportunityLineItem.sObjectType; }

public override List<Schema.SObjectField> getSObjectFieldList(){ return new List<Schema.SObjectField> { OpportunityLineItem.Id, OpportunityLineItem.Quantity, OpportunityLineItem.SalesPrice }; }

}

 
   public Schema.SObjectType getSObjectType(){
      return OpportunityLineItem.sObjectType;
   }
 
   public override List<Schema.SObjectField> getSObjectFieldList(){
      return new List<Schema.SObjectField> {
         OpportunityLineItem.Id,
         OpportunityLineItem.Quantity,
         OpportunityLineItem.SalesPrice
      };
   }
 
}

public class OpportunitiesSelector extends fflib_SObjectSelector {
 
   public Schema.SObjectType getSObjectType(){
      return Opportunity.sObjectType;
   }
 
   public override List<Schema.SObjectField> getSObjectFieldList(){
      return new List<Schema.SObjectField> {
         Opportunity.Id,
         Opportunity.StageName
      };
   }
 
   public List<Opportunity> selectByIdWithLineItems(Set<Id> recordIds){
      fflib_QueryFactory query = newQueryFactory();
      query.setCondition('Id IN :recordIds');
      query.addQueryFactorySubselect( 
         new OpportunityLineItemsSelector().newQueryFactory() 
      );
      return (List<Opportunity>) Database.query( query.toSOQL() );
   }
 
}

public Schema.SObjectType getSObjectType(){ return Opportunity.sObjectType; }

public override List<Schema.SObjectField> getSObjectFieldList(){ return new List<Schema.SObjectField> { Opportunity.Id, Opportunity.StageName }; }

public List selectByIdWithLineItems(Set recordIds){ fflib_QueryFactory query = newQueryFactory(); query.setCondition('Id IN :recordIds'); query.addQueryFactorySubselect( new OpportunityLineItemsSelector().newQueryFactory() ); return (List) Database.query( query.toSOQL() ); }

}

I get compile error: Method does not exist or incorrect signature: void addQueryFactorySubselect(ev_QueryFactory) from the type ev_QueryFactory at line 17 column 13

Method does not exist or incorrect signature: void addQueryFactorySubselect(ev_QueryFactory) from the type ev_QueryFactory at line 17 column 13

Below method does exist in "ev_SObjectSelector" class

global fflib__QueryFactory addQueryFactorySubselect(fflib__QueryFactory parentQueryFactory)
{
    return addQueryFactorySubselect(parentQueryFactory, true);
}

What am I missing here?

We have been using FF library for Separation of Concerns framework and it is working great. We need to add subquery to it, but running into issues. Example I am following is from this article: https://quirkyapex.com/2016/08/18/fflib-selector-layer/

public class OpportunityLineItemsSelector extends fflib_SObjectSelector {

public Schema.SObjectType getSObjectType(){ return OpportunityLineItem.sObjectType; }

public override List<Schema.SObjectField> getSObjectFieldList(){ return new List<Schema.SObjectField> { OpportunityLineItem.Id, OpportunityLineItem.Quantity, OpportunityLineItem.SalesPrice }; }

}

public class OpportunitiesSelector extends fflib_SObjectSelector {

public Schema.SObjectType getSObjectType(){ return Opportunity.sObjectType; }

public override List<Schema.SObjectField> getSObjectFieldList(){ return new List<Schema.SObjectField> { Opportunity.Id, Opportunity.StageName }; }

public List selectByIdWithLineItems(Set recordIds){ fflib_QueryFactory query = newQueryFactory(); query.setCondition('Id IN :recordIds'); query.addQueryFactorySubselect( new OpportunityLineItemsSelector().newQueryFactory() ); return (List) Database.query( query.toSOQL() ); }

}

I get compile error: Method does not exist or incorrect signature: void addQueryFactorySubselect(ev_QueryFactory) from the type ev_QueryFactory at line 17 column 13

Below method does exist in "ev_SObjectSelector" class

global fflib__QueryFactory addQueryFactorySubselect(fflib__QueryFactory parentQueryFactory)
{
    return addQueryFactorySubselect(parentQueryFactory, true);
}

What am I missing here?

We have been using FF library for Separation of Concerns framework and it is working great. We need to add subquery to it, but running into issues. Example I am following is from this article: https://quirkyapex.com/2016/08/18/fflib-selector-layer/

public class OpportunityLineItemsSelector extends fflib_SObjectSelector {
 
   public Schema.SObjectType getSObjectType(){
      return OpportunityLineItem.sObjectType;
   }
 
   public override List<Schema.SObjectField> getSObjectFieldList(){
      return new List<Schema.SObjectField> {
         OpportunityLineItem.Id,
         OpportunityLineItem.Quantity,
         OpportunityLineItem.SalesPrice
      };
   }
 
}

public class OpportunitiesSelector extends fflib_SObjectSelector {
 
   public Schema.SObjectType getSObjectType(){
      return Opportunity.sObjectType;
   }
 
   public override List<Schema.SObjectField> getSObjectFieldList(){
      return new List<Schema.SObjectField> {
         Opportunity.Id,
         Opportunity.StageName
      };
   }
 
   public List<Opportunity> selectByIdWithLineItems(Set<Id> recordIds){
      fflib_QueryFactory query = newQueryFactory();
      query.setCondition('Id IN :recordIds');
      query.addQueryFactorySubselect( 
         new OpportunityLineItemsSelector().newQueryFactory() 
      );
      return (List<Opportunity>) Database.query( query.toSOQL() );
   }
 
}

I get compile error:

Method does not exist or incorrect signature: void addQueryFactorySubselect(ev_QueryFactory) from the type ev_QueryFactory at line 17 column 13

Below method does exist in "ev_SObjectSelector" class

global fflib__QueryFactory addQueryFactorySubselect(fflib__QueryFactory parentQueryFactory)
{
    return addQueryFactorySubselect(parentQueryFactory, true);
}

What am I missing here?

Source Link
Mitesh Sura
  • 699
  • 1
  • 10
  • 21
Loading