Generalize entity API adapter inner join query building.