I'm querying an object(Custom_Obj_A) and some other fields from lookup object(Custom_Obj_B) using soql. These fields are then stored in Map<Id,Custom_Obj_A)>. I also want to utilize the fields from Custom_obj_B but the map only stores fields from Custom_obj_A (which is as expected). Is there a way to also store the fields of custom_obj_B ?. As of now, i'm looping through the query and adding the fields to Custom_obj_b list. Looking for a better option on this.
Thanks in advance.