Filtering relationships by literal property in pattern predicates

(based on systay's 3db3d279b1f1aeb896d68f7b05c6b9becea58005)