I am having trouble understanding how maps are populated in Salesforce. For example, what happens in the situation below:
Edited code below:
Map<Id, Account> accountMap = new Map<Id, Account>([SELECT Id, FirstName, LastName FROM Account]);
What is the key and what is the value here? What happems if you have multiple fields in the query? The SOQL statement returns a list of Accounts so how does does the map get populated?
For Governor Limits, there is a 6MB heap limit for general usage of Maps and Lists. However, during Bulk triggers, Lists can take up to 200 records. Is there a limit on how many record a Map can take during bulk?
I realise there are a few questions here but I can't seem to find any information about these questions I have. Any help appreciated!