Re: My django model joining wrong fields when there are multiple related fields with join

2018-09-25 Thread luca bocchi
Hi Sadaf, re the m2m rel: since your not adding additional fields on the intermediate model ProductShadowCategory, there's no need for that: class Category(SlugableModel): shadow_products = models.ManyToManyField("product_management.Product") the orm will automatically create an intermediate

Re: My django model joining wrong fields when there are multiple related fields with join

2018-09-25 Thread luca bocchi
Hi Sadaf, re the m2m rel: since your not adding additional fields on the intermediate model ProductShadowCategory, there's no need for that: class Category(SlugableModel): shadow_products = models.ManyToManyField("product_management.Product") the orm will automatically create an intermediate

My django model joining wrong fields when there are multiple related fields with join

2018-09-19 Thread Sadaf Noor
My product model has two different relationship with category model: 1. One to One 2. One to Many through ProductShadowCategory table. Now the situation is when I tried to fetch using the second relationship, I am getting the result from my first relationship. For example this is what I am