It's not just invention clauses. It applies to all intellectual property, including copyright (at least in NL), as long as what you're producing in your own time is related to your job.
Exactly how far "related to your job" extends is up for debate. Because of that, I have an additional clause in my employment contract that specifically states that any contribution I write to FOSS projects is mine to license and distribute.