Well you could use different variables. Set e1.entity and e2.entity to point at the members of the type collection you want and then do.
An example to parent the first with the last would be
EntityParent e1\ent, e2\ent
An example to parent the first with the last would be
e1.entity = First entity e2.entity = Last entity EntityParent e1\ent, e2\ent