A writ of certiorari was issued to review a judgment of the superior court of the county of Santa Clara. It appears that the Glenwood Lumber Company, a corporation, on the tenth day of November, 1904, filed in said superior court of Santa Clara County a complaint against Frances L. Mason, A. Becker, and James H. Tooze, as defendants, to recover $81.23 claimed to be due from Becker and Tooze for lumber furnished to and used by them in the construction of a building which, as contractors, they erected for Frances J. Mason, as owner, and to foreclose a mechanic's lien of said Glenwood Lumber Company upon said building. The complaint was in proper form and its allegations, if proven, would have entitled the plaintiff to the relief claimed. The defendants answered, denying some of the allegations of the complaint. At the conclusion of the trial a nonsuit was granted as to defendant Mason upon the ground that the claim of lien filed by the plaintiff did not truly state the terms of the contract between said plaintiff and Becker and Tooze, in that the time of payment for the lumber was not correctly stated. The court, however, filed findings of fact in which it found that the claim of lien truly and correctly stated plaintiff's demands against Becker and Tooze in all other respects, and that Becker and Tooze were indebted to plaintiff for materials furnished in the sum of $81.23. Upon these findings judgment went in favor of plaintiff against said defendants for such sum, together with interest and costs.
It is this judgment that the petitioners herein, defendants in the former suit, seek to annul. Certain preliminary objections are made by the respondents to the consideration of the writ. These are based upon the failure to serve the petition upon the real party in interest and upon the delay in seeking this relief. The conclusion we have reached upon the merits makes it unnecessary to consider these preliminary points. *Page 315
The petitioners contend that since the amount of the plaintiff's claim in the action of the Glenwood Lumber Co. v. Mason et al. was less than three hundred dollars, the jurisdiction of the superior court to entertain the action depended entirely upon the fact that the foreclosure of a lien was sought, thus making the action one of equitable cognizance; that when the plaintiffs failed to establish their right to the foreclosure, the equitable character of the action was lost and it became a simple action at law for the recovery of money, and the amount sought to be recovered being less than three hundred dollars, the superior court was without jurisdiction.
This contention finds support in a decision of a Department of this court in Miller v. Carlisle, 127 Cal. 327, [59 P. 785]. Five plaintiffs had there united to enforce alleged liens for labor done by them upon certain mining ground. The court made findings declaring that "the liens of plaintiffs do not attach to said land," and that there was due to the plaintiffs from the defendants personally the several sums demanded, each of which was less than three hundred dollars. Judgment against said defendants for such sums was accordingly entered in favor of the plaintiffs. The defendant Carlisle appealed from an order denying his motion for a new trial. This order was reversed upon the ground taken by the petitioners here, the court holding that where "the lien fails and the court can administer no equitable relief whatever, it must logically follow that the residue of the action — a dispute concerning money less than three hundred dollars in amount — can no longer engage the attention of the court."
If this case correctly states the law, the judgment rendered by the superior court of Santa Clara County in favor of the Glenwood Lumber Company against Becker and Tooze was beyond the jurisdiction of that court and void. But we think that the rule declared in Miller v. Carlisle was based upon an insufficient consideration of the true basis of the jurisdiction of the superior court. As we are not confronted by a situation in which property rights can have grown up on the faith of the decision, there can be no impropriety in now correcting the error, if error was committed. And there is the more justification for reconsidering *Page 316 the doctrine declared in Miller v. Carlisle, 127 Cal. 329, [59 P. 785], since it appears from the opinion in that case that the Department in reaching its conclusion was not aided by any argument or presentation of authorities on behalf of the respondents, who were relying upon the judgment there declared to be void. (See 127 Cal. 329, [59 P. 785].)
There can be no doubt that upon the filing of the complaint, setting forth a cause of action for the foreclosure of a mechanic's lien, the superior court was invested with jurisdiction of the cause, a suit for such foreclosure being a suit in equity. (Curnow v. Blue Gravel Co., 68 Cal. 262, [9 P. 149]; Brock v. Bruce, 5 Cal. 279.) And the court, having jurisdiction to hear and determine the cause so presented, had jurisdiction to grant the relief demanded in whole, or to refuse it in whole, or to grant it in part and refuse it in part. Whatever action it took, whether rightfully or erroneously, was in the exercise of the jurisdiction conferred upon it. It has frequently been held that when a court of equity once obtains jurisdiction of a case it will decide the whole case as between the parties and not leave any part of it for future litigation.(Watson v. Sutro, 86 Cal. 528, [24 P. 172, 25 P. 64];Whitehead v. Sweet, 126 Cal. 67, 76, [58 P. 376].) The test of the jurisdiction of a court is ordinarily to be found in the nature of the case as made by the complaint and the relief sought. The fact that the plaintiff does not succeed in establishing all that he claims does not oust the court of its jurisdiction to give judgment for so much as is established.
It is unquestioned that in an ordinary action at law where the jurisdiction of the superior court depends upon the amount of the "demand," the court may, where more than three hundred dollars is demanded in the complaint, render judgment for less. (Dashiell v.Slingerland, 60 Cal. 653; Greenbaum v. Martinez, 86 Cal. 459, [25 P. 12]; Rodley v. Curry, 120 Cal. 541, [52 P. 999].) The same result was reached under the former constitution, giving the district courts jurisdiction in cases "where the amount in dispute exceeds two hundred dollars." (Jackson v. Whartenby,5 Cal. 94.) And in other states it is the general rule that the jurisdiction, under similar constitutional or statutory *Page 317 provisions, is to be determined by the amount claimed by the plaintiff without regard to the amount found due. (9 Cyc. p. 775, and cases cited.) Again, the superior court has, under the constitution, jurisdiction in "all criminal cases amounting to felony." Yet a defendant may be convicted in the superior court of a lesser offense, if he was charged with felony which included the lesser offense. (Ex parte Donahue, 65 Cal. 474, [4 P. 449].) We see no reason why the same rule should not apply where the jurisdiction of the superior court attaches by reason of the case being one in equity. The nature of the action as an equitable one is fixed by the allegations of the complaint. The fact that the plaintiff fails to establish all of his claims does not change the nature of the action.
In the opinion in Miller v. Carlisle, 127 Cal. 327, [59 P. 785], the court cites several cases in which it was held that in a suit to foreclose a mortgage made to secure a promissory note, where the proof at the trial showed that the mortgage was invalid, the court sitting in equity had no power to render judgment for the sum due on the note, and should dismiss the bill without prejudice. (Dowell v. Mitchell, 105 U.S. 430; Kramer v.Cohn, 119 U.S. 355, [7 Sup. Ct. 277]; Rose v. West, 50 Ga. 474;Gamage v. Harris, 79 Me. 531, [11 A. 422].) But these cases all arose in jurisdictions where equitable and legal remedies were not administered in the same tribunal, and in such jurisdictions legal and equitable claims cannot be blended together in one suit. (Scott v. Armstrong, 146 U.S. 512, [13 Sup. Ct. 148].)
In this state, on the contrary, legal and equitable remedies may be pursued and granted in the same tribunal, and in a single action (White v. Lyons, 42 Cal. 252), and the fact that the equitable relief is not obtained furnishes no reason in itself for the refusal of legal relief in the same action. As was pointed out in Miller v. Carlisle, "it is nothing uncommon to render judgment for money due to the lien claimant from a defendant personally liable to him, although the lien itself fails of enforcement." (Kennedy-Shaw Lumber Co. v. Priet,113 Cal. 291, [45 P. 336]; Lacore v. Leonard, 45 Cal. 394.) If the views hereinbefore expressed be correct, the fact that the amount claimed is less than three hundred dollars does not affect the power of the court to grant *Page 318 this relief. The jurisdiction in all such cases rests, not upon the amount claimed, but upon the fact that the suit is one to foreclose a mechanic's lien, and is therefore a suit in equity within the meaning of the constitution.
It may be remarked that we are not dealing with the question whether jurisdiction can be fraudulently conferred upon the superior court by the assertion in bad faith of an unfounded claim. We have no doubt that an action at law in which the actual demand amounts to less than three hundred dollars cannot be brought and retained within the jurisdiction of the superior court by adding a fictitious claim for a larger sum, or by making a fictitious showing as a basis for a purported prayer for equitable relief. But no such question is presented here. There is nothing to indicate that the Glenwood Lumber Company was not seeking, in good faith, to foreclose a lien claimed by it. It follows that the lower court must be held to have acted within its jurisdiction in rendering the judgment complained of.
The writ is dismissed.
Henshaw, J., Beatty, C.J., Shaw, J., Angellotti, J., McFarland, J., and Lorigan, J., concurred.