Where a decree of nullity is granted in respect of a voidable marriage, the relationship between any child and the parties to the marriage shall be such as if at the date of the decree it had been dissolved instead of being annulled.