add entities-to-posts and posts-to-entities relationship and related tests