The opinion of the court was delivered by
Anders, G. J. —Harrington & Smith, who were co-partners, brought this action to establish and foreclose a lien on certain premises described in the complaint, for materials furnished for use in the construction thereon of a three-story brick building. • By order of the court, this action was consolidated with several others of like character, for the purpose of trial. At and prior to the time of the *809erection of said building, tbe defendant, Mary M. Miller, was, and she still is, the owner of the fee of the lands described, and one W. H. Cowie, and one Henry Meyers were owners, each in his own right, of a leasehold interest in separate and distinct portions thereof. Meyers and Cowie, being owners of said leasehold estates, entered into an agreement between themselves to construct said building, and caused the construction thereof to be commenced by one Kavanaugh, a contractor. The defendants, Oliver & Son, were sub-contractors, and at their request, appellants, Harrington & Smith, furnished materials for use in said building, commencing on the 16th day of December, 1889, and ceasing on the 23d day of March, 1890.
On the 24th day of September, 1889, the said Cowie, by deed, duly acknowledged and recorded, sold and conveyed his interest in and to the said premises to the defendant, R. N. McFadden, and afte-wards, by a second deed, dated April 27,1890, he sold acd conveyed to said McFadden all his right, title and interest in and to said building. All the right, title and interest of the said Meyers in and to the said premises o^d building was by him sold and conveyed to the defiendan i, W. V. Rinehart, on February 3,1890, by deed duly acknowledged and recorded. On June 4, 1890, and after said conveyances had been made to Rinehart and McFadden, respectively, and duly recorded, appellants, Harrington & Smith, filed their claim of lien in the auditor’s office as required by law, in which claim the said McFadden and Rinehart were described as owners of the leasehold interests conveyed to them, respectively, by said Cowie and Meyers. On February 7, 1891, these appellants commenced this action, and made the numerous co-lienors, Mary M. Miller, the owner of the fee; Oliver & Son, the sub-contractors; and W. V. Rinehart and R. N. McFadden, the grantees of Meyers and Cowie, defendants. The defendants, Rinehart, McFadden, Mary M. Miller, *810Oliver & Son, and others, were defaulted after due service, and the co-lienors, whose actions were consolidated and tried with that of these appellants, made no opposition to the foreclosure of the lien of appellants at the trial.
No question was made by any of the defendants as to a defect of parties defendant, and no opposition or defense to the action was offered by any of the defendants. Appellants seem to have proved their claim, as stated in their notice of lien, to the satisfaction of the court; but the learned judge, nevertheless, on his own motion, refused to admit the lien, and dismissed the foreclosure proceedings, for the reason that Cowie and Meyers were not made parties defendant. That action of the court is assigned as error. It is claimed by appellants (1) that under our statutes the objection of defect of parties can only be raised by demurrer or answer; by demurrer when the defect appears on the face of the complaint, and by answer when it does not so appear; and (2) that if the objection is not so taken before the commencement of the trial, it is deemed waived. We have no doubt that such is the law, for it is so provided in the code of civil procedure in plain and unmistakable language. Code Proc., §§ 189, 191, 193. It therefore follows that if the defendants themselves, who were in default, had been present in court, they could not have raised the objection during the progress of the trial. But it may be suggested that the provisions of the statute above referred to were designed to establish rules of procedure applicable only to parties litigant, and were not intended to govern the action of the court itself. Conceding that to he true, it is equally true that the court possesses no power not conferred by law. Its power to dismiss an action for want of parties is confined to cases where the plaintiff refuses or neglects to make the necessary parties, after having been ordered so to do by the court. See Code Proc. 409. If other parties than those *811before tbe court are necessary to a complete determination of the matter in controversy, it is the duty of the court to cause them to be brought in. See Code Proc. 150. In the case at bar there was no such order made, and consequently the learned judge who tried the cause was not warranted in dismissing the foreclosure proceedings on account of a defect of parties.
But was there, in fact, a defect of parties in this action ? We think not. Actions to enforce liens of mechanics and material men are equitable in their nature, and the procedure is the same as governs in the foreclosure of mortgages on real estate. See Gen. Stat., § 1677; Washington Iron Works v. Jensen, 3 Wash. 584 (28 Pac. Rep. 1019); Fox v. Nachtsheim, 3 Wash. 684 (29 Pac. Rep. 141). The principle is well established that a mortgagor of real estate who has sold and conveyed his equity of redemption is not a necessary party to an action to foreclose the mortgage, where no personal judgment is sought against him. Stevens v. Campbell, 21 Ind. 471; Story’s Equity Pleading (6th ed.), § 197; 2 Jones on Mortgages, 1404. And the same rule applies in the foreclosure of liens. The object of the action is to affect the property, not the debt, and after assignment the assignor has no longer any interest in the property to be affected, and is not a necessary party under the rule that all persons interested in the subject-matter in controversy should be made parties, either as plaintiff or defendant. Rose v. Persse & Brooks’ Paper Works, 29 Conn. 256; Kellenberger v. Boyer, 37 Ind. 188; Edwards v. Derrickson, 28 N. J. Law, 49; Derrickson v. Edwards, 29 N. J. Law, 468; McCormick v. Lawton, 3 Neb. 449; 2 Jones, Liens, § 1399.
The statute requires that a party claiming a lien shall file for record with the county auditor a claim stating, among other things, the “name of the owner or reputed owner, if known.” And we think the lien notice in this case fulfills *812that requirement of the statute. It states that Rinehart and McFadden were the reputed owners of the property sought to be affected by the lien, and the successors in interest of Meyers and Cowie, their grantees, and at that time the public record of deeds in the office of the county auditor showed that Rinehart and McFadden held the legal title to the premises in question.
The plaintiffs sought no pérsonaljudgmentagainst either Cowie or Meyers, and we can perceive no reason why they should have been made parties defendant. It may be, however, that the learned judge based his ruling on the fact, as found by him, that the deed from Cowie to McFadden, while absolute on its face, was given as security for money advanced, and was, therefore, in fact, a mortgage. Assuming that the deed was properly shown to have been intended as a mortgage as between the parties to it, we are still of the opinion that for the purposes of this case McFadden, and not Cowie, was the “owner” of the leasehold interest conveyed to him, and was properly so designated, both in the lien notice and in the complaint in this action. To hold otherwise would be to acknowledge the power of an owner of property upon which labor had been performed, or for the construction or improvement of which materials had been furnished*, to evade the statute and to defeat the lien, whenever he may choose to do so. "Whatever equities others may have in the property, in such cases, he must be deemed to be the owner who has the legal title. Such a conveyance tranfers the legal title to the vendee, notwithstanding the equities of the grantor, and all the interest the latter has is a right to redeem. See Espinosa v. Gregory, 40 Cal. 58; Hughes v. Davis, 40 Cal. 117; Brophy Mining Co. v. Brophy, etc., Co. 15 Nev. 101. It has even been held that parties who have contracted for the purchase of property, and entered into possession and made improvements, are, so far as the vendee’s interests are concerned, owners *813under the mechanic’s lien laws. Phillips on Mechanics’ Liens (2d ed.), § 69. And in Nazareth, etc., Institution, v. Lowe, 1 B. Mon. 257, it was held that a purchaser of land on which a vendor’s lien was reserved in the deed for the whole purchase money was the owner.
It would seem that, in any view of this case, McFadden and Rinehart were the owners, to the extent of the interest in the premises sought to be affected, and were properly designated as such in the notice of lien. The finding of the court shows that the claim of lien set forth everything required by the statute, and an inspection of the notice itself shows that the finding was correct. The claim of lien, being unobjectionable, should not have been rejected by the court; nor should a decree of foreclosure have been refused, even if it had been apparent that other interested parties were not before the court. The rights of interested parties who are not made defendants and duly served with notice of the proceedings, are not affected by the decree. Kelly v. Chapman, 13 Ill. 530; Dunphy v. Riddle, 86 Ill. 22.
It is further objected that the court erred in receiving parol evidence to show that the deed from Cowie to MeFadden was intended as a mortgage; hut in the view we have taken of the effect of such a conveyance, the question becomes unimportant.
It may not be inappropriate, however, to observe that the testimony objected to by appellants was offered in causes other than this one, and we are, therefore, unable to say that it should have been rejected if proper in the cause in which it was offered. In consolidated causes, each case ought to be tried on its merits, as if it stood alone. The rules of evidence are .the same, whether cases are tried separately or together, and all competent evidence is admissible. But parties in one of several consolidated causes ought not to be deprived of any legal right by reason of *814the introduction of proper evidence in another cause simply because the two are tried together. The object of the legislature in providing for the consolidating of these lien cases was to facilitate the trial and to avoid unnecessary expenses, and not to deprive a worthy class of litigants of any rights or privileges they would have if their actions were tried separately. The testimony complained of was not offered or received in this cause, and should not have been held applicable to it without the consent of plaintiffs. Kimball v. Thomson, 4 Cush. 441; Lofland v. Coward, 12 Heist. 546.
No claim is made against Mary M. Miller in this action, or against her interest in the premises in controversy. The only interests sought to be charged with the lien are those of McFadden and Rinehart, and as to them we think appellants are entitled to the relief demanded.
The judgment is reversed, and the cause remanded to the court below with directions to enter a decree establishing and foreclosing the lien of appellants, Harrington & Smith, as prayed in their complaint.
Dunbar, Stiles and Scott, JJ., concur.
Hoyt, J., concurs in the result.