I have a very simple datamodel with a one-to-many relationship between video and comments
class Video(models.Model): url = models.URLField(unique=True) ..... class Comment(models.Model): title = models.CharField(max_length=128) video = models.ForeignKey('Video') .....
I want to request a video and capture the entire graphic object (video with all comments). Looking at sql, I see that it makes two choices: one for the video and one for the comments. How to avoid this? I want to make a joint connection and capture everything at once.
Can this be done with django?
source share