I have installed a managed package on my org. That managed package has an object with same API name as one of my custom objects. I have a trigger on my custom object where I query my object and assign it to a list. When I query SF runs my query on my custom object but when it comes to collection SF is using managed package object in collection and thus, I get collection store error "System.TypeException:Collection store exception adding all list to list
Map<id,SurveyInfo__c> surveyMap = new Map<id,SurveyInfo__c>([ SELECT Id,Name FROM SurveyInfo__c Limit 10]);
List<SurveyInfo__c> surveyList = new List<SurveyInfo__c>();
surveyList.addAll(surveyMap.Values());
Above code is for custom object. In query I get custom object but my lists formed are for managed object i.e. namespace.SurveyInfo
namespace__SurveyInfo__c
you'll be getting your unmanaged version ofSurveyInfo__c
in the situation you describe. The only way you can get to objects within the managed package is to prefix them with the namespace. How do you know that 'SF is using managed package object'?