Lateran II declares that the marriage of a cleric is not marriage (1139)
In 1059 Rome had already ordered the faithful not to hear the Mass of a priest who did not leave his wife, against an ancient canon. Until the twelfth century, a cleric who married after ordination was deposed, but his marriage was not declared null. Lateran I (1123) forbade presbyters, deacons, subdeacons and monks to have concubines or to contract marriage, and ordered unions already contracted to be dissolved. Lateran II (1139) said expressly that the union of bishops, presbyters, deacons, subdeacons, canons regular, monks and professed lay brothers, contracted against the rule of the church, “is not marriage”.
From then on, for canon law, holy orders are an impediment that annuls marriage. It is the law that Trent confirmed.