Yes thank you !
I noticed that you have set the relation “has_one” to your client from the Product model. Based on the rails documentation on associations when using a “has_one” association, the table “client” would be the one owning the association id. So the generated query does respect the type of association defined.
I don’t know how your database is structured, but if the association is owned by the “products” table via a “client_id”, a better fitting association would be “belongs_to” (here is the documentation).