This may not be an exact answer to your questions, but I came across this question while attempting to solve the following issue (11.0): in ReverseItemsGrid (and PE_GetRelatedParts) items are being returned after a relationship has been deleted from the most recent generation of the part. This seems to be because the default SQL in PE_GetRelatedParts doesn't return only the most recent generation. In order to return relationship ONLY on the most recent generation you can add another inner join to the sql ~line 158. The reason is that the existing SQL only returns the most recent generation of MATCHING PARTS:
String sqlQuery = @"
SELECT item.id FROM {1} item
INNER JOIN
(
SELECT item.CONFIG_ID, MAX(item.GENERATION) GENERATION FROM {1} item
INNER JOIN {2} relationshipItem ON item.ID = relationshipItem.SOURCE_ID AND relationshipItem.RELATED_ID ='{0}'
GROUP BY item.CONFIG_ID
) groupeditem ON groupeditem.CONFIG_ID = item.CONFIG_ID AND groupeditem.GENERATION = item.GENERATION
/*NEW CLAUSE*/
INNER JOIN (SELECT item.CONFIG_ID, MAX(item.GENERATION) GENERATION FROM {1} item
GROUP BY item.CONFIG_ID
) maxgen ON maxgen.CONFIG_ID = item.CONFIG_ID AND maxgen.GENERATION = item.GENERATION
";