The defendant Becker was a building contractor who became bankrupt. At the time of his bankruptcy he had completed for Mrs. Careaga and for Mr. Martin each a separate dwelling-house under valid statutory contracts. The final payments becoming due, Mrs. Careaga and Mr. Martin deposited the amounts of their payments in court with appropriate averments, asking the court to call in the lien claimants to the funds, apportion the money, and dismiss plaintiffs, respectively, without further costs or charge. In the case of Hubbard v. Brinker, Becker, because of his bankruptcy, abandoned the incompleted building which he was constructing for Brinker, and Hubbard and Hart sued Brinker to establish liens for materials furnished. Their cases were consolidated. Hubbard admittedly had furnished material to Becker, which material had been used in the construction of the buildings. No question arises over this nor over the validity of his lien claims in the matter of form or substantive proof to sustain them. But Hubbard had taken a mortgage upon real property owned by Becker, the contractor, which mortgage by its terms covered the debts of Becker growing out of these materials so furnished him. Because of the existence of this mortgage security the trial court decided against the validity of his lien claims for materials furnished and decreed that he could not participate in the funds admittedly due to the holders of valid liens. *304 Hubbard’s appeals in all three of the above entitled cases present this as the principal question for determination. What is here said upon it is, therefore, applicable to all the cases. Certain points of minor significance arising separately in the different cases will receive their separate consideration.
The principal inquiry has been thus stated: “May the defendant Hubbard, as the creditor of the defendant Becker, retain and resort to the security of a mortgage lien, and at the same time claim and foreclose a materialman’s lien for the satisfaction of an indebtedness which is found to be clearly covered by both liens?” The trial court and the court of appeals made answer (1) that by virtue of section 726 of the Code of Civil Procedure this could not be done. That section declares that “There can be but one action for the recovery of any debt, . . . secured by mortgage upon real or personal property.” (2) That aside from the consideration of section 726, the fact that Hubbard had taken security from Becker for the latter’s debt, even though that security was in the form of a mortgage upon real property of Becker, operated to annul the former’s right to his materialman’s liens.
1. At the outset it is important to note what changes the legislature made in the common-law rule, and therefore what it sought to accomplish in the declaration contained in section 726 of the Code of Civil Procedure. At common law a mortgage was a conveyance of title upon condition subsequent. That title became absolute and indefeasible upon breach of the condition. No right of redemption existed. The sole recourse was a resort to equity for relief against the forfeiture. Moreover, the mortgagee had his right to go to law to recover the amount of the mortgage debt and to enforce his recovery by imprisonment of the debtor. Nor did the doing of any of these acts impair his mortgage security. Under our statutory system the first radical change was to declare that a mortgage conveyed no title, but gave only the security of a lien upon the property. (Civ. Code, secs. 2888, 2920, 2923.) This radical change having been established, section 726 became the expression of a natural corollary to that change. To simplify procedure and to relieve the mortgagor (who was usually though not always the primary debtor) it was declared that but one action should be brought to enforce the mortgage debt. The mortgaged property thus
*305
became the primary fund which must first be' exhausted before any other remedy or relief could be had against the primary debtor. If this primary fund should prove insufficient to extinguish the debt, then in the same action a deficiency judgment could be docketed against the primary debtor. No longer could the primary debtor be pursued in an action which did not take into recognition the existence of the mortgage security. Otherwise it would be true to-day that if the primary debtor had given a mortgage upon his own property, and subsequently had sold it subject to the mortgage, the mortgagee could enforce the debt against the primary debtor without recourse to the mortgaged property, leaving the primary debtor to his chance of recovery over against his vendee. Or, again, the mortgage might 'have been given as security by one other than the primary debtor and with the understanding between the mortgagor and the primary debtor that the mortgaged property should first be exhausted in payment of the debt. If our existing rule did not obtain, the mortgagee could in like manner pursue the primary debtor without reference to the security. Every reason for the existence of the rule discloses and declares that it was designed for the benefit of the primary debtor, and indeed it is so decided.
(Ould
v.
Stoddard,
We may now with propriety turn to the cases which respondents cite as supporting their contention, for the purpose of determining whether any of the previous utterances of this court conflict with the views here expressed. The first of these is
Ould
v.
Stoddard,
2. It is sometimes, but not always nor even usually, true, that the taking of new or additional security operates to destroy an existing lien. It so operates only in four classes of eases: 1. Where the destruction is worked by virtue of a positive declaration of law; 2. Where it is worked by the agreement and contract of the parties; 3. Where it is worked by necessary intendment growing out of the agreement of the parties, in that the taking of the later security is inconsistent with the continued existence thereafter of the lien, and, finally, 4. Where the nature of the earlier or later security, as that it is concealed or undisclosed, gives rise to a situation where it would partake of fraud upon other claimants to permit the earlier lien to be held valid, whereupon equity interposes and declares it to have been waived or lost by the taking of
*310
the later security, or what is in effect the same, erects a bar to its enforcement. To one or another of these classes all cases decreeing the destruction of an earlier lien by virtue of the taking of later security are referable. Thus in
Barrows
v.
Baughman,
In
Willison
v.
Douglas,
So far as this examination of authorities has proceeded we find that the actions are between the contractor and the owner of the property upon which the work was done, to enforce the lien upon that property, and we find that the adjudications are merely to the effect that the courts will consider each of these contracts according to its facts, and that when the contract between the parties is such as to force the conclusion that the intent of the parties was to waive the mechanic’s lien, as where a mortgage is taken upon the same property, or as where the payment to the lien claimant was to be made by a deed of part of the same property, it is held that these contracts are inconsistent with the conception of a right to a mechanic’s lien. In no one of them, however, is *313 the denial of the right to the mechanic’s lien based upon the mere fact that the lien claimant has taken security other than that afforded by his lien. The decision in each case is based upon findings that the nature of the contract under which the security is taken forces the conclusion that there was a waiver of the right to the lien. Of these cases no criticism may be made, and with them no fault may be found.
We come now, however, to consider another class of cases laying down a much broader rule, to the effect that the taking of any other security by the lien claimant is a waiver of his right to his mechanic’s or materialman’s lien. Thus,
Trullinger
v.
Kofoed,
But our review of the cases heretofore made shows that neither
Gorman
v.
Sagner,
We have so far limited this discussion to an analysis of the eases which it is contended hold the destruction of the mechanic’s lien. We have endeavored to show that the principles of most of these cases have been misunderstood and accordingly misrepresented, and that in the other cases, as in the Oregon case and Illinois cases, the principles declared are wholly inapplicable to our law. We may now sum up this matter by adding that the great weight of authority supports the views here expressed, and, without unduly prolonging this discussion, by quotations, we may cite 1 Jones on Liens, see. 1101; Bender-Moss on Liens, sec. 630; Phillips on Mechanic’s Lien, sec. 280;
Roberts
v.
Wilcoxson,
It follows herefrom that Hubbard, in taking mortgage security from Becker upon the property of Becker for the value of the material which he might sell to him, did not lose his right to a mechanic’s lien, either by virtue of section 726 of the Code of Civil Procedure, nor by the just application of any rule of decision holding that the taking of other security destroys the right to such lien.
S. F. 6106: The evidence in this ease showed that Becker had paid to Hubbard one thousand dollars which he directed should be applied on certain specified accounts, none of which was the Careaga account. The court found that Becker paid the one thousand dollars to Hubbard “on his general.account and not on account of material furnished for the construction of said building for said Mollie A. Careaga. ’ ’ This is a sufficiently explicit finding that Hubbard’s account with Becker on account of material furnished to the Careaga building was not reduced by any specific payments, and appellant has no just cause for complaint over this finding.
S. F. 6300: In this case the suit of Hubbard to foreclose his lien and the suit of Hart to foreclose his lien were consolidated. The Home Union, a corporation, was a defendant and cross-complainant. It was not given notice of the setting of the ease for trial and did not appear at the trial. It moved for a new trial. The amount of its lien claim was $22.98. The court granted the motion conditionally, declaring that if the amount due the Home Union was deposited in court the motion would be denied. Subsequently the court entered its further order, reciting that the total amount due the Home Union was $26.98, and that Henry Hart had deposited twenty-seven dollars with the clerk of the court in full satisfaction of the claim and demand of the Home Union Company, and the motion for new trial was denied. This was irregular, in that the Home Union was not allowed to file a cross-bill and establish the amount to which it was entitled in addition to its claim of lien. The amount involved may be trifling, but the principle is of consequence. A party *318 under such circumstances who, by the finding of the court is entitled to prevail in the action and to have judgment accordingly, is likewise entitled to his hearing in court upon the question of the settlement of the legal costs which he has incurred.
It follows from the foregoing that Hubbard is entitled to share in the funds admittedly applicable to the payment of the liens by mechanics and materialmen, and that the Home Union is entitled to a reversal of the order denying it a new trial for the reasons indicated.
The motion to dismiss this appeal is denied. The appeal was taken under the new or alternative method. The notice of appeal was filed with the clerk thirty-one days after judgment was filed. No other notice of appeal was required. (Code Civ. Proc., sec. 941b;
Lang
v.
Lilley etc. Co.,
Wherefore the judgments and orders appealed from are reversed and the causes remanded.
Shaw, J., Sloss, J., Melvin, J., Lorigan, J., and Angellotti, C. J., concurred.
