The Church Fathers held that both accounts are true. In his book "An Exact Exposition of the Orthodox Faith", John Damascene argues that Heli of the tribe of Nathan (the son of David) died childless, and Jacob of the tribe of Solomon, took his wife and raised up seed to his brother and begat Joseph, in accordance with scripture, namely, yibbum (the mitzvah that a man must marry his brother's childless widow); Joseph, therefore, is by nature the son of Jacob, of the line of Solomon, but by law he is the son of Heli of the line of Nathan.