Here’s an example setup I have:
I have Blog posts that are shown on a landing page. I have a PostsCell that retrieves the blog posts. A post includes id, title, body, date.
If you click into a blog post, I have a comment section. I load those comments using a CommentsCell and pass in the blog post ID to select the correct comments. A comment includes an id, author, text, date.
All that works great and was super simple to set up. Now I want to order the blog posts shown on the landing page by the number of comments. Can I query my Posts table and my Comments table at the same time in my PostsCell? Or have I set up my DB schema incorrectly?