Hi Nuno!

I checked git history and I confirm that Repo.preload(user, :projects) was called.

I did investigation in many_to_may

many_to_many(

:projects,

Project,

join_through: UserProject,

on_replace: :delete

)

and many_to_many on_replace do not have an option that is not delete. Maybe this behaviour is Ecto by design?

Thank you for writing this post, you helped me a lot with my side project!

Regards, Karlo.

Written by

Founder of Tentamen, software testing agency.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store