I have a list of VisualForce components called VFComponent, a list of attributes name VFAttributes and a junction object VFComponentToAttribute that links them in a many to many relationship.
I am trying to get a list of components, in the form of:
List<VFComponent__c> VList = [Query here FROM VFComponentToAttribute];
For the query I have tried getting Id, VFComponent__r.Id, VFComponent all to no avail. Everything I try seems to give me a type error.
Could someone be kind enough to explain how I could get a list,populated with child objects from the junction object in this way.
To clarify I am trying to pass a list of objects to some other code, but in general I would like to better understand what Salesforce actually stores in the junction object, I thought is was something like a key, but if I query the Id and try to use that I get type mismatches as well:
List<Id> idList = [Select childobject__r.id From JuncitonObject];
That gives me also gives an error as if the query result were objects and not IDs, which I suppose they are?
In short I am confused.