gorm.io icon indicating copy to clipboard operation
gorm.io copied to clipboard

[Question] Joins-Preloading explanation of generated join type unclear.

Open JesseLabruyere opened this issue 3 years ago • 1 comments

Document Link

https://gorm.io/docs/preload.html#Joins-Preloading

Your Question

The documentation states that "Join Preload will loads association data using inner join". But the (Company) query example shows a conditional left join being generated and not an inner join. Its also not clear if this is always the case when using Joins() or only when using Joins() in combination with extra conditions.

Expected answer

Clear explanation of which type of join is used when.

JesseLabruyere avatar Feb 21 '22 12:02 JesseLabruyere

And I find it weird why Joins() doesn't work in has-many relationship

Roldification avatar May 15 '23 06:05 Roldification