(1) A child born out of wedlock may be affiliated by its natural father or mother. When the marriage of the parent becomes null and void, the child born between them shall be deemed to be a child born out of wedlock.
(2) A child born out of wedlock, when its father and mother marry, shall be deemed to be a child born during the marriage from the time of the marriage.