I'm aware of this question was asked before, but that question doesn't have concise answer for my problem. I'm bit confused after seeing two examples in order to impelement OneToManyRelation.
In my example:
class Product(BaseModel):
name = models.CharField(max_length=255)
class Advantages(BaseModel):
title = models.CharField(max_length=255)
product = models.ForeignKey(Product, CASCADE)
Different products can have many advantages linked to it, so I'm using ForeignKey for this, but here I saw that it is also possible to use cross table relation in order to implement OneToManyRelation
categories & sub categories with many to many relationship
class ProductAdvantage(BaseModel):
title = models.CharField(max_length=255)
product = models.ForeignKey(Product, CASCADE)
Which one best practice for the OneToManyRelation? One product can have many advantages Thank you for the answer