volatiletech / sqlboiler

Generate a Go ORM tailored to your database schema.
BSD 3-Clause "New" or "Revised" License
6.56k stars 533 forks source link

Added hooks to templates for relationships. #1348

Open mmitten opened 5 months ago

mmitten commented 5 months ago

My attempt to resolve #445

Added into the templates for relationships as I did not see any other place that made sense for how the hooks otherwise behaved. Happy to follow up if a something was missed.

stephenafamo commented 3 months ago

While I see this as a good change, I wonder if this may cause issues for those who are used to the current behaviour 🤔

mmitten commented 3 months ago

Now that you mention it, it could be a breaking change, as adding another hook trigger where it was previously not expected could lead to some unpleasant side effects.

I am not opposed to tabling this for a major version revision, as the use case I wrote it for has since been resolved with something else.

stephenafamo commented 3 months ago

I'll label this as breaking and may add it to an eventual v5 release.