The defendant, through its board of trustees, entered into a written contract with one C. C. Foy, on the fourth day of January, 1908, for the construction of a grammar school building, for the sum of $16,000 in cash and the old school building at the agreed value of $1,000. Under the stipulations of the .contract said building was to be completed by the first day of August, 1908.
The plaintiff, prior to the twenty-first day of September, 1908, furnished the said Foy certain materials which, accord*589ing to the averments of the complaint, “were to be used and were used in the construction of the schoolhouse building described in the said contract and on the said date there was due and unpaid from the said C. C. Foy to the plaintiff the sum of $2,400.28 for the materials furnished as aforesaid. ’ ’
On the said twenty-first day of September, 1908, so the complaint alleges and the evidence shows, “the plaintiff delivered to and served on the said Fairfield School District, and on each of said trustees personally, a certain written notice” in accordance with the following provision of section 1184 of the Code of Civil Procedure: “. . . Any of the persons mentioned in section eleven hundred and eighty-three, except the contractor, may at any time give to the reputed owner a written notice that they have performed labor or furnished materials, or both, to the contractor, or other person acting by authority of the reputed owner, or that they have agreed to do so, stating in general terms the kind of labor or materials, and the name of the person to or for whom the same was done or furnished, or both, and the amount in value, as near as may be, of that already done or furnished, or both, and of the whole agreed to be done or furnished, or both. . •. . ”
This action is prosecuted by plaintiff under the authority of the foregoing provision of the section of the code mentioned.
The answer, in addition to specific denials of the averments of the complaint, sets up a number of special defenses, among which is the following, using the language of the answer:
“And answering further the complaint of plaintiff and as a further and separate defense, defendant alleges that on or about the twenty-seventh day of October, 1908, the said plaintiff commenced an action. in the above-entitled court against the Fairfield School District, in the county of Solano, state of California, Eoy D. Smith, James N. Watson, James Loekie and C. C. Foy, defendants, which action was for the same cause of action as that set forth in the complaint herein; that on the thirtieth day of March, 1909, at Fairfield, in said action commenced as aforesaid, and for the same cause of action as set forth in the complaint herein, a judgment was duly given, made and entered, a copy of which judgment is hereto attached, marked Exhibit ‘A,’ and made a part hereof, to which judgment reference is hereby made; that said judgment has never been appealed from and is still in full force and effect.”
*590Smith, Watkins and Lockie, mentioned as defendants in the action referred to in the foregoing allegations of the answer, were, at the time said action was instituted and tried and judgment rendered and entered therein, members of and constituted the board of trustees of the defendant.
The other special defenses pleaded in the answer are that the plaintiff, prior to the commencement of its action, at no time presented to the defendant its alleged claim against the district, “or any claim based upon the items set forth in said complaint; that at no time has the said plaintiff ever presented to said district in the manner and form required by law an itemized statement of any amount due from said district to plaintiff”; that the plaintiff, prior to the twenty-first day .of September, 1908, being unable to complete the building described in the contract, sublet, with the consent of the district, the contract for painting said building and the contract for furnishing and installing blackboards therein to other parties, named in the answer; that said last referred to parties completed said work, and that Foy assigned to them, in the respective amounts to which they were entitled for said work, his claim under said contract for the money due for said work; that said assigned claims, with other like assignments for other work done by other parties, were presented to and accepted by said school district before the twenty-first day of September, 1908, and that “there was nothing due, owing or unpaid to said C. C. Foy from the said Fairfield School District on the said twenty-first day of September, 1908; that the payment of said assigned claims exhausted the funds of said district which it had on hand for the construction of said building. ’ ’
The court’s findings are adverse' to all the material claims made by the defendant, and, accordingly, judgment was rendered and entered in favor of the plaintiff.
This appeal is by the defendant from said judgment and the order denying it a new trial.
We think that the plea and proof of the judgment in the former action, instituted by the plaintiff upon the claim upon which it declares in this action, constitute a complete and conclusive bar to its right to maintain the present action. It will, therefore, be unnecessary to consider at length other points made by the appellant, although we are convinced, from a careful examination of the record, that the findings of the court *591that Foy completed the building, according to the terms of his contract, before the twenty-first day of September, 1908, and that he was personally paid money on the contract after the service of the notice prescribed by section 1184 of the Code of Civil Procedure, are not supported by the evidence. The undisputed testimony of Foy discloses that he did not so complete the building and that he himself never did complete it. The evidence without conflict further shows that Foy, having discovered before the twenty-first day of September, 1908, that he would be unable to carry out the terms of the contract, according to the plans and specifications by which the building was to be erected and completed, so announced to the board of trustees of the defendant. Without passing upon the competency of the «evidence by which arrangements were entered into with others to do certain work called for by Foy’s contract, we feel warranted in saying that none can read the record without being forced to this conclusion: That Foy practically abandoned the contract prior to the twenty-first day of September, 1908, and that the board of trustees of the defendant thereupon, with the voluntary acquiescence of Foy, entered into contracts with others for the completion of the portions of the contract left uncompleted by Foy; that, at the meeting of the board of trustees at which the claims were allowed for the work so performed—that is, for the work by the “subcontractors”—Foy and said subcontractors were present by the request of the board in order that Foy might immediately by his own act approve the allowance of the claims to said subcontractors. In other words, since the contract for erecting the building was with Foy, and in his name, the board conceived it to be legally necessary to allow the claims in Foy’s name, although he was not entitled to them, and therefore, as a matter of protection to itself or against the probability of being required to pay said claims the second time, insisted upon the presence of all the parties so that Foy, upon the allowance of the claims, might immediately assign the same to the subcontractors, who were the real owners thereof. This ?>- precisely what was done at said meeting, Foy at no time laying any claim to the claims so allowed by the board and by him assigned to the “subcontractors.” Objection was made to the testimony from which the foregoing facts are reasonably dedu'eible upon the ground that it was incompetent, *592and the court reserved its rulings on many of the questions so objected to until the argument of the case upon the merits. It is probable that the court finally concluded that the testimony thus allowed was not competent and, therefore, did not consider it in making its findings. But, assuming such to be the case, the question whether the court thus committed prejudicial error need not, as stated, be inquired into, in view of the conclusion at which we have arrived as to the effect of the pleaded judgment in the former action upon the right of the plaintiff to maintain the present action.
The judgment-roll in the former action was introduced and received in evidence. It is expressly admitted by counsel for the respondent that said action was instituted on the twenty-seventh day of October, 1908—subsequent to the date of the service of the notice on the defendant under section 1184 of the Code of Civil Procedure. Although the defendant here and the members of its board of trustees were; with the contractor, made defendants in the former action, and although the first of the two distinct causes of action set up in the complaint in said action was for damages for a breach of the contract between the defendant here and Foy, it is clear from the averments of the complaint in said action that the subject matter thereof is precisely the same as the subject matter of the present action. The complaint in the former action, as does the complaint here, sets out the contract between Foy and the defendant, and alleges that the plaintiff furnished certain materials to Foy to be used in the construction of the school building under said contract between Foy and the defendant, and further alleges, after disclosing that certain payments had been made by Foy on the original amount due plaintiff for the materials so furnished to Foy, that the plaintiff has been damaged in the sum of $2,400.28, precisely the sum which it is alleged in the complaint in the present action is due from Foy to the plaintiff." But it is in effect admitted by counsel for the plaintiff that both actions were founded on or originated out of the same transaction. The point made by the plaintiff is that the judgment in the former action, for reasons which will hereafter be noted, cannot be made to operate as an estoppel here.
In the present action the court made the following finding relative to the judgment in the former action: “On or about *593the twenty-seventh day of October, 1908, plaintiff commenced an' action in the above-entitled court against the Fairfield School District in the county of Solano, state of California, Roy D. Smith, James N. Watson, James Loekie and C. C. Foy, defendants. Said action was not for the same cause of action as that set forth in the complaint herein, but the cause of action set forth was an entirely separate and distinct cause of action. The cause of action set forth in the present action was not under a claim arising out of the transaction set forth in the former complaint. The present action does not affect all the parties to the former action, or any of them, except the Fairfield School District. ” It is further found that the judgment in the former action has never been appealed from, and is still in force and effect, and that “said judgment is not a bar to the present action.”
' The foregoing findings are to a great extent mere conclusions of law, and are in line with the theory upon which the respondent argues against the contention of the appellant that the effect of said judgment is to estop the maintenance of the present action, the position of the respondent being that the cause of action of the former action is not the same as the cause of action here, for two reasons, viz.: 1. That the parties to the former are different from or not the same parties as those to the present action; 2. That the former action was an action at law for damages for breach of the contract between Foy and the defendant, and for the neglect of the defendant in not exacting the statutory bond from the contractor, and that the present action is a suit in equity the purpose of which is, in effect, to enforce a lien.
Both positions are obviously untenable.
There could be, it seems to us, no proposition less debatable than that where an action is commenced against a party and a judgment entered for or against him, such judgment, after becoming final, will always operate as an estoppel or bar against the maintenance of another action thereafter brought against such party alone for the same cause, notwithstanding that other parties might have been joined with him in such action, and the subject matter of the action is adjudicated as to all the parties thereto. In other words, it cannot possibly be true that where, as here, a cause of action has been adjudicated as to all the defendants to an action, the judgment *594therein cannot be successfully set up in bar of an action thereafter commenced for precisely the same cause of action against one of such defendants. By the phrase, “the same parties,” we do not understand it is meant that all the parties plaintiff and parties defendant to the former action must be joined in the later action to render available the plea of the judgment in the first action as an estoppel in the subsequent action. 'Where the action is against a number of defendants and the merits have been litigated and adjudicated as to all, and the same plaintiff thereafter proceeds in a subsequent action against one of said defendants for identically the same cause of action, then the later action is between the “same parties” as those to the former in the sense that the plea of res adjudicata may, with perfect legal propriety, be set up, for, as between the plaintiff and the party defendant to the later action the merits as to the same cause of action have been as definitively adjudicated as if such defendant were the only party defendant to the first action.
The position that the judgment in the former action cannot be pleaded in this because the one was an action at law and the other a suit in equity is without any sound reason for its support. To sustain that position would be to declare that it is not the subject matter of the action, but the remedy by which a party may seek, judicially, to assert a right that is the test determinative of the applicability of the plea of res adjudicata; but, obviously, the remedy is not, nor could it be, made the criterion without upsetting the very object of pleas in estoppel by judgment. If, for example, a county should proceed by the extraordinary legal remedy of mandamus to compel a county official to turn over to the public treasury certain moneys which, it was charged, he had collected in his official capacity and should lose out on the merits, could not such county official, in an ordinary action at law thereafter brought by the county to recover the same money, interpose with success the plea of estoppel based upon the judgment in mandate ? The question answers itself.
These views are not inconsistent with anything that is said in Lillis v. Emigrant Ditch, 95 Cal. 553, 558, [30 Pac. 1108], Parnell v. Hahn, 61 Cal. 131, 132, Hall v. Susskind, 109 Cal. 203, 205, [41 Pac. 1012], Newhall v. Hatch, 134 Cal. 269, 272, [51 L. R. A. 673, 66 Pac. 266]; McCormick v. Gross, 135 Cal. *595302, 304, [67 Pac. 766], or Laguna Drainage Dist. v. Martin Co., 5 Cal. App. 166, 169, [89 Pac. 993], cited by the respondent. To the contrary, the eases mentioned very clearly announce the rule as we understand it and think that it ought to be construed and applied here. Conceding that the present action is one in equity, and we find a striking counterpart of the proposition which is presented here in the ease of Parnell v. Hahn, 61 Cal. 131. There, in the first action, Hahn proceeded against Parnell and several others in a suit to quiet title to a- certain piece of land belonging to him and, to that end, to have it determined that said parties did not have an equitable estate or interest therein by reason of the terms of a certain contract for the sale of said land. Parnell alone answered the complaint and, as a defendant, asked, as affirmative relief, specific performance of said contract of sale. The court’s decision in that case on all the issues was in favor of Hahn. Thereafter Parnell brought an action for damages for the nonperformance of the same contract upon which he founded his defense and asked affirmative relief in the former action. The judgment in the former action was pleaded in the subsequent action as an estoppel by Hahn. The court said: “The facts which constitute the causes of action in both are therefore the same; and the parties to the former action were the same as in the present action, for although the complaint was filed against Parnell, Hill and Corcoran, yet Corcoran had no interest whatever in the contract between Hahn and Parnell. Hill acted only as the agent of Parnell, and the latter was th.e only one who answered the complaint and claimed to be the sole equitable owner of the land under the contract of sale. The matter in issue in the former action involved the validity and legal effect of the contract of sale, and the issue in this action involves the same question.”
Now, the effect of the service of the notice mentioned in section 1184 of the Code of Civil Procedure upon the defendant by the plaintiff was to subrogate the latter to the right Foy had to any money held by the defendant as part of the contract price for the erection of the building. The notice, in other words, operated as an equitable garnishment, or as an assignment pro tanto of the money due from the defendant to the plaintiff. (Bates v. Santa Barbara Co., 90 Cal. 543, 547.) The service of said notice was the only means by which the *596defendant could be bound to pay the plaintiff on its claim any money due the contractor from the defendant. It is, of course, correct to say that no cause of action could have accrued -against the defendant in favor of the plaintiff on account of the materials furnished by the latter to the contractor until such notice had been served on the defendant, and that, consequently, in the absence of the service of such notice, no valid or binding judgment in favor of the plaintiff as against the defendant could have been rendered. Whether, had no notice been served on the defendant prior to the commencement of the former action, the judgment in favor of the defendant could be successfully pleaded in bar of the present action, we need not stop to inquire. Nor need we examine the question whether, in order to bind the defendant by a judgment in the former action, said action not being directly based upon the garnishment of which the service of the notice was the effect, it was necessary to serve such notice. It is sufficient to know that, if the notice was necessary to support a judgment in said action against the defendant, such notice having been in fact served prior to the commencement of said action, and, although not pleaded in the complaint therein, it was the duty of the plaintiff, in order to have bound the defendant by any judgment it might have obtained against the former, to have pleaded and relied upon the notice in said action, having made the defendant one of the parties defendant thereto, and thus have fully put in issue and litigated in one and the same action all the matters which might have been necessary to a definitive determination of the whole case—that is, of all matters which might have materially affected any or all the parties to the action as to the subject matter thereof. On the other hand, if the notice was not necessary in order to bind the defendant in that action, then all the matters materially affecting the defendant as to the subject matter of that action were litigated and adjudicated. In this connection, it may be parenthetically observed that the second cause of action set out in the complaint in the former action was based upon the alleged failure of the defendant and its board of trustees to exact from the contractor the bond required by the statute to indemnify those furnishing labor and materials for a building, in case the contractor failed to pay for the same. It is plainly evident that the plaintiff in that action thus *597sought, in preference to pleading and relying upon the notice prescribed by section 1184 of the Code of Civil Procedure, which it had previously served on the defendant, to enforce pro tanto, against the defendant, if thus it could be done, any judgment that it might obtain against the contractor and the defendant in said former action for the former’s alleged breach of the contract. In other words, it is manifest that the object of the second cause of action set out in the complaint in the former action was, in effect, to subserve the purpose, if thus it could be accomplished, that the notice prescribed by section 1184 is designed to effectuate for a party furnishing materials for or performing labor on a building to be erected under a contract between the owner of the land and the contractor. But, however that may be, it is very clear, as before declared, that, although the recovery sought in and by the former action was one at law and the action ex delicto in character, said action nevertheless originated out of, and was founded upon, precisely the same transaction as that upon which the present action is predicated. It, in other words, involved the litigation and determination of identically the same question as that involved here, and, although the plaintiff failed in said former action to plead and rely upon the notice which it had served upon the defendant, in compliance with section 1184 of the Code of Civil Procedure, we cannot bring ourselves to the belief that it was not its duty to have done so, if necessary to bind the defendant by any judgment which might have been obtained against it and the contractor in said action, to the extent of its indebtedness to the contractor. We are, therefore, unable to dissuade ourselves from the conviction that the judgment in the former action is conclusive as to the ultimate question involved here as between each and all the parties to said former action.
The rule as here applied is in perfect harmony with the theory upon which estoppels by judgment proceed. In Wolverton v. Baker, 98 Cal. 632, [33 Pac. 732], the rule is given as follows: “Where a given matter becomes the subject of litigation in and of adjudication by a court of competent jurisdiction, the court requires the parties to that litigation to bring forward their whole case, and will not, except under special circumstances, permit the same parties to open the same subject of litigation in respect of matter which might have been *598 brought forward as a part of the subject in contest, but which was not brought forward only because they have through negligence, inadvertence, or even accident, omitted part of their case. [Italics ours.] The plea of res adjudicaba applies, except in special eases, not only to points upon which the court was actually required by the parties to form an opinion and pronounce a judgment, but to every point which properly belonged to the subject of litigation and which the parties, exercising reasonable diligence, might have put forward at the time.” (See, also, Flynn v. Hite, 107 Cal. 455, [40 Pac. 749]; Crew v. Pratt, 119 Cal. 149, [51 Pac. 38]; Silverton v. Mercantile Trust Co., 18 Cal. App. 180, [122 Pac. 976].)
In Quirk v. Rooney, 130 Cal. 505, 510, [62 Pac. 825], the court says: “We do not think it the policy of the law to allow as many different suits between the same parties in regard to the same subject matter as there might be different modes of establishing title to property.”
The foregoing authorities seem to us to be decisive of the ease here upon the question of estoppel.
The judgment and order are, therefore, reversed.
Chipman, P. J., and Burnett, J., concurred.
A petition for a rehearing of this cause was denied by the district court of appeal on October 5, 1912, and the following opinion then rendered thereon: