Matt Black said:
I think Eusebius covers this in some depth in his
Church History but I can't remember what he says

Will try and look it up when I get home
Here's what I've come up with....
According to
Julius Africanus (c160-c240 AD) (I believe also referenced in Eusebius) in his
Letter to Aristides:
"
And for this reason the one traced the pedigree of Jacob the father of Joseph from David through Solomon; the other traced that of Heli also, though in a different way, the father of Joseph, from Nathan the son of David. And they ought not indeed to have been ignorant that both orders of the ancestors enumerated are the generation of David, the royal tribe of Juda."
He continuing in Chapter II:
"For indeed, by the succession of legitimate offspring, and according to law whenever another raised up children to the name of a brother dying childless; for because no clear hope of resurrection was yet given them, they had a representation of the future promise in a kind of mortal resurrection, with the view of perpetuating the name of one deceased;—whereas, then, of those entered in this genealogy, some succeeded by legitimate descent as son to father, while others begotten in one family were introduced to another in name, mention is therefore made of both—of those who were progenitors in fact, and of those who were so only in name.
Thus neither of the evangelists is in error, as the one reckons by nature and the other by law. For the several generations, viz., those descending from Solomon and those from Nathan, were so intermingled by the raising up of children to the childless, and by second marriages, and the raising up of seed, that the same persons are quite justly reckoned to belong at one time to the one, and at another to the other, i.e., to their reputed or to their actual fathers. And hence it is that both these accounts are true, and come down to Joseph, with considerable intricacy indeed, but yet quite accurately."
In Chapter III...
"But in order that what I have said may be made evident, I shall explain the interchange of the generations. If we reckon the generations from David through Solomon, Matthan is found to be the third from the end, who begat Jacob the father of Joseph. But if, with Luke, we reckon them from Nathan the son of David, in like manner the third from the end is Melchi, whose son was Heli the father of Joseph. For Joseph was the son of Heli, the son of Melchi*.
[*Note: But in our text in Luke iii. 23, 24, and so, too, in the Vulgate, Matthat and Levi are inserted between Heli and Melchi. It may be that these two names were not found in the copy used by Africanus.] As Joseph, therefore, is the object proposed to us, we have to show how it is that each is represented as his father, both Jacob as descending from Solomon, and Heli as descending from Nathan: first, how these two, Jacob and Heli, were brothers; and then also how the fathers of these, Matthan and Melchi* (Matthat), being of different families, are shown to be the grandfathers of Joseph. Well, then, Matthan and Melchi*(Matthat), having taken the same woman to wife in succession, begat children who were uterine brothers, as the law did not prevent a widow, whether such by divorce or by the death of her husband, from marrying another. By Estha, then—for such is her name according to tradition—Matthan first, the descendant of Solomon, begets Jacob; and on Matthan’s death, Melchi*(Matthat), who traces his descent back to Nathan, being of the same tribe but of another family, having married her, as has been already said, had a son Heli. Thus, then, we shall find Jacob and Heli uterine brothers, though of different families. And of these, the one Jacob having taken the wife of his brother Heli, who died childless, begat by her the third, Joseph—his son by nature and by account. Whence also it is written, “And Jacob begat Joseph.” But according to law he was the son of Heli, for Jacob his brother raised up seed to him. Wherefore also the genealogy deduced through him will not be made void, which the Evangelist Matthew in his enumeration gives thus: “And Jacob begat Joseph.” But Luke, on the other hand, says, “Who was the son, as was supposed (for this, too, he adds), of Joseph, the son of Heli, the son of Melchi*(Matthat--see note above).” For it was not possible more distinctly to state the generation according to law; and thus in this mode of generation he has entirely omitted the word “begat” to the very end, carrying back the genealogy by way of conclusion to Adam and to God."
Comment--So here's early testimony that the geneologies in Matthew and Luke are both of Joseph, with Joseph being descendent of David through Solomon through his biological father, Jacob, and also of David through Nathan through his legal father, Heli. (Jacob and Heli being half-brothers with the same mother--Estha)
Then a few centuries later, according to
John of Damascus, in his
Exposition of the Orthodox Faith:
"But that Joseph is descended from the tribe of David is expressly demonstrated by Matthew and Luke, the most holy evangelists.
But Matthew derives Joseph from David through Solomon, while Luke does so through Nathan; while over the holy Virgin’s origin both pass in silence.
One ought to remember that it was not the custom of the Hebrews nor of the divine Scripture to give genealogies of women; and the law was to prevent one tribe seeking wives from another[Numbers 36:6-12]. . And so since Joseph was descended from the tribe of David and was a just man (for this the divine Gospel testifies), he would not have espoused the holy Virgin contrary to the law; he would not have taken her unless she had been of the same tribe. It was sufficient, therefore, to demonstrate the descent of Joseph.
One ought also to observe this, that the law was that when a man died without seed, this man’s brother should take to wife the wife of the dead man and raise up seed to his brother. The offspring, therefore, belonged by nature to the second, that is, to him that begat it, but by law to the dead.
Born then of the line of Nathan, the son of David, Levi begat Melchi* [*"Matthat", see NOTE above in citation of Julius Africanus] and Panther: Panther begat Barpanther, so called. This Barpanther begat Joachim:
Joachim begat the holy Mother of God. And of the line of Solomon, the son of David, Mathan had a wife of whom he begat Jacob. Now on the death of Mathan, Melchi* (Matthat), of the tribe of Nathan, the son of Levi and brother of Panther, married the wife of Mathan, Jacob’s mother, of whom he begat Heli.
Therefore Jacob and Heli became brothers on the mother’s side, Jacob being of the tribe of Solomon and Heli of the tribe of Nathan.
Then Heli of the tribe of Nathan died childless, and Jacob his brother, of the tribe of Solomon, took his wife and raised up seed to his brother and begat Joseph.
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. " (De Fide Ortho IV, 14)
Comments:
--So John basically repeats what Julius states regarding the geneologies of Joseph while adding the detail of Mary's great-grandfather and Joseph's (legal) grandfather being brothers--both sons of Levi--making them legally second cousins once removed.
--The names of Mary's parents, Joachim and Anna, go back very early, at least to the
Protoevangelium of James (mid 2nd century AD) where they are described as David's descendents. (These names were consistent in Christian tradition)
--Both
Ignatius (
Ephesians 18) and
Justin Martyr (
Adv Trypho 100) also testify to the fact that Mary is of the seed of David.
--So Joseph is biologically and legally the descendent of David, and Mary is the descendent of David as well. If this assessment is correct then God seems to have had "all his bases covered". :thumbs:
As for the Talmud reference...
‘...that saw “Mary the daughter of Eli” in the shades, hanging by the fibres of her breasts; and there are that say, the gate, or, as elsewhere (Chagiga, fol. 77. 4.), the bar of the gate of hell is fixed to her ear’
(I got this from a website which advocates the idea that Luke's geneology was that of Mary).
If this is indeed a reference to Christ's mother Mary, then it's maliciousness may give one pause before ascribing too much crediblity to it regarding the exact connection between Mary and Heli (although the two are cousins, based on John's (of Damascus) account). At any rate, from what I've read, in
Christian circles the idea that Luke's geneology was that of Mary, rather that of Joseph, came very late in history.