The doctrine of the English court of chancery in its general statement, that the vendor of lands who had not taken security, although he makes an absolute conveyance with a formal acknowledgment, that the consideration is fully paid, retains an equitable lien for the payment of the purchase money, which will be enforced against the vendee, and all persons claiming under him, other than bona fide purchasers without notice, has always prevailed in this State. The lien is not dependent upon a specific agreement for its creation — it exists independent of such agreement, upon a broad principle of equity, that one man ought not, in good conscience, to get and keep the estate of another, without paying the consideration money. Resting upon this principle, whoever resists the enforcement of the lien assumes the burden of proving, that “ it has been intentionally displaced or waived by the consent of parties. If under all the circumstances it remains in doubt, then the lien attaches.” — Simpson v. McAllister, 56 Ala. 228; 2 Story’s Eq. §§ 1219-24.
The lien is intended for .the security of the vendor, and is preserved and enforced for his benefit and protection. As an incident, it passes to an assignee of the debt, if necessary to *37protect the vendor from ultimate liability to the assignee. But when (prior to the' recent statute — Pamph. Acts, 1878-9, p. 171,) the transfer of the note for the purchase money is made without recourse on the vendor; when he is freed from all liability for its payment, the lien not being necessary for his protection, does not pass to the assignee. — Hall v. Click, 5 Ala. 363; Hightower v. Rigsby, 56 Ala. 126; Bankhead v. Owen, 60 Ala. 457. That is not, as is argued by counsel, the question this case involves. The sale of the lands resulted in an obligation upon the purchaser to pay the vendor a specific sum of money, and instead of requiring the note to he made payable to himself, he caused it to be made payable to his wife, intending it partially as a gift, and partially as compensation for the relinquishment of dower in other lands he had sold and conveyed.
When the transfer of a note or other evidence of debt, given for the purchase money, is of a nature that involves the vendor in liability to the transferee for the payment of the debt, it is upon a principle of subrogation to the security the lien affords the vendor for the debt, that the transferee can enforce the lien. When the liability of the vendor does not exist, the medium of subrogation fails. The theory underlying the whole doctrine of the lien of a vendor for the purchase money of lands, is, that to the extent of the' lien, the vendee, his heirs or devisees, and all persons claiming under him with notice, are trustees of the land for the vendor. In its very nature the lien is assignable, and, as we have seen before, passes with an unqualified transfer of the note or other evidence of debt, given for the purchase money. When the husband, instead of taking the note for the purchase money payable to himself, caused it to he made payable to the wife, and delivered it to her, though it may have been a mere gift, there was an irrevocable appropriation or assignment of the purchase money to the wife. No further or other act on the part of the husband was necessary to give full effect to the appropriation. The vendee be-came a trustee of the land, not for the husband, but for the wife, to whom he owed the duty of paying the purchase money.
Though not made the cause of demurrer, if a bill is defective for the want of necessary parties, on the hearing the chancellor must, ex mero motu, notice the defect, and cause the bill to be amended, or, if the complainant declines to amend, dismiss without prejudice. — Goodman v. Benham, 16 Ala. 625. And the absence of necessary parties is a matter of which this court will, ex mero motu, take notice. — Prout v. Hoge, 57 Ala. 28; Dooley v. Villalonga, 61 Ala. 129.
The present bill is not, however, objectionable -because of the omission of necessary parties, though it may be all proper par*38ties are not before the court. The personal representative of the husband, has no right or interest in the subject-matter of the suit; nor have the "heirs or devisees of the husband; and if they had been made parties defendant, their demurrer for misjoinder would have been sustained.
Under the statute abolishing naked or dry trusts no estate or interest passed to Porter by the conveyance expressed to be in trust for Miller and Withers. The operation of the statute is to merge the legal and equitable estates such a conveyance would have created at common law, directly and immediately in the eestui que trust.— You v. Flinn, 34 Ala. 409; Tindal v. Drake, 51 Ala. 574. The original purchasers, Miller and Withers, having parted with all interest in the lands, and the appellant having succeeded to their interest, they were not indispensable parties. — Batre v. Auze, 5 Ala. 173. To constitute a necessary and indispensable party to a bill, in whose absence the court will not proceed to a final decree, he must have a material interest in the issue which will be necessarily affected by the decree. — 1 Dan. Ch. Pr. 190, and note. No such interest appears from the bill to reside in the absent parties it is insisted should be brought before the court.
Affirmed.