
    [No. 3,995.]
    JEROME B. COX and THOMAS J. ARNOLD v. THE WESTERN PACIFIC RAILROAD COMPANY, THE WESTERN PACIFIC RAILROAD, THE CENTRAL PACIFIC RAILROAD COMPANY OF CALIFORNIA, and CHARLES McLAUGHLIN.
    Abandonment oe Contract.—If a party who contracts to grade a railroad is prevented by the party with whom he contracts from completing his whole contract, he is justified in abandoning it, and may claim to be paid a fan- compensation for the work performed.
    Complaint as Against General DeMUBEEB.—An averment in a complaint, that the plaintiff was prevented by the defendant from performing a contract, is sufficient, as against a general demurrer, without stating by what means the plaintiff was prevented from performing it.
    Idem.—A complaint, which states a good cause of action for the recovery of money, is not demurrable on the ground that it does not state facts sufficient to constitute a cause of action, because there is also an ineffectual effort to state in the complaint a cause of action for the foreclosure of a mechanics' lien to secure the same money.
    Misjoinder op Actions in Complaint.—The question not decided, whether the joinder of a cause of action for the recovery of money, with a cause of action for the foreclosure of a mechanics’ lien to secure the money, is proper, if the complaint is demurred to for a misjoinder of causes of action.
    Demurrer tor Misjoindeb.—The joinder of a cause of action for the re- " covery of money, with a cause of action for the enforcement of a lien to secure the money, if improper, can be taken advantage of only by a special demurrer for misjoinder of causes of action.
    Contbaot not Sevebable.—A contract to grade a section of a railroad is an entire contract, and a provision in it for payments from time to time as the work progresses, does not make it severable.
    Mechanics’ Lien Under Entire Contract.—But one mechanics’ lien can be acquired on a section of a railroad to be graded under an entire contract, and the contractor cannot, because payments are due from time to time, file successive liens as payments fall due.
    Appeal from the District Court, Third Judicial District, Alameda County.
    The facts not stated in the opinion are found in the report of the case on a former appeal, 4á Cal. 18.
    
      McAllisters & Bergin, J. B. Felton, and M. G. Cobb, for the Appellants.
    
      Under the code there is but one form of action in this State, and if the complaint state facts which entitle the plaintiff to relief, either legal or equitable, it is not demurrable, on the ground that it does not state facts sufficient to constitute a cause of action. (White v. Lyons, 42 Cal. 282; Poett v. Stearns, 28 Cal. 228.) "
    The complaint, as amended, shows a good cause of action against McLaughlin. Execution of a contract, rendition of 170,000 and odd thousand dollars of services under that contract, and an admission that the plaintiffs were prevented from completing their services under the contract, would, in ordinary cases, establish a good cause of action. The demurrer of Mr. McLaughlin confesses this- state of facts, yet the Court decide that upon this admitted state of facts the plaintiffs are not entitled to recover. (Jones v. Judd, 4 N. Y. 412; Stewart v. Keteltas, 36 N. Y. 390; Allamon v. Mayor Albany, 43 Barb. 35; Canal Co. v. Gordon, 6 Wall. U. S. 569.)
    
      Campbell, Fox & Campbell, for Respondents.
    The demurrer in this case was properly sustained. It had already been held by this Court, in this case, that the contract was an entirety; that the contractor (if he could acquire a lien at all, which was not passed upon) was entitled to only one lien, and for this purpose his claim must be filed within the time specified in the statute after completion of the work; and that the lien must be filed upon the whole work.
    It is true that the Court intimated that the former complaint did not show that the performance, of the work, or completion of the contract, had been prevented by defendants, and in this respect plaintiffs have attempted to amend the present complaint. But the facts stated are insufficient to cure the defect, as they do not show a prevention of performance by defendants; and if the complaint were sufficient in this- respect, it does not overcome either of the other objections, any one of which is fatal to plaintiffs’ case.
   By the Court:

Upon the former appeal, we held that the contract entered into between McLaughlin and Cox, Myers & Co. was an entire contract; that the contractor was only entitled to one lien, and for this purpose his claim must be filed within the time specified in the statute after completion of the work; and that the lien must be filed upon the whole work.

Upon the return of the case to the Court below, the complaint was amended by inserting therein an averment that the defendants prevented the completion of the contract; that McLaughlin completed the twenty miles of road upon which a lien is sought to be charged on or before October 15th, 1866; and a prayer for a judgment against McLaughlin personally. To the complaint as amended, each of the defendants separately demurred upon the ground that the complaint did not state facts sufficient to constitute a cause of action. The court sustained these demurrers, and, the plaintiffs declining further to amend, judgment was rendered that the plaintiffs take nothing, and dismissing the action.

The former decision has become the law of the case, and there can be no doubt that the demurrers interposed by the defendant companies were properly sustained. As against them the amended complaint is in no respect better than the original complaint. It still counts on an entire contract, and seeks the foreclosure of a lien which was filed before the completion of the work, and on a portion only of the road.

But it is claimed by the appellant that the complaint at least states a good cause of action for a personal judgment against McLaughlin, and that the court erred in sustaining the demurrer interposed by him. If the plaintiffs were prevented from completing the contract by the defendants they were fully justified in abandoning it, and had then a right to be paid a fair compensation for the work they had performed. Disregarding all those parts of the complaint which look to a foreclosure of the lien, we do not perceive wherein it fails to state all the facts necessary for a recovery against McLaughlin. It is true, that the averment that the plaintiffs were prevented from completing the contract does not show how or by what means. they were prevented, but we think it sufficient in this respect when tested by a general demurrer. The question, then, is whether a complaint, which states a good cause of action for the recovery of money, is demurrable on the ground that it does not state facts sufficient to constitute a cause of action, because there was also an ineffectual effort to state in the complaint a cause of action for the foreclosure of a lien to secure the same money. It was earnestly argued at the bar by counsel for respondent, that under our statute,' in relation to liens, the personal action cannot be joined with the equitable one, and that if the equitable action fails the personal one must fail also. But whether such a joinder of causes of action is proper or not we do not find it necessary now to decide, for, if improper, the objection should be taken by a special and not a general demurrer. Misjoinder of causes of action is one of the grounds of demurrer provided by statute, and it is deemed to be waived unless specially taken by demurrer or answer.

The question whether the Court erred in allowing the complaint to be amended is not before us. So far as the record shows, it was amended without objection.

As against McLaughlin, we hold, then, that the complaint states a cause of action, and that the demurrer filed by him should have been overruled.

The judgment in favor of McLaughlin is reversed, and the cause remanded with directions to overrule the demurrer filed by him. In other respects the judgment is affirmed.

Eemittitur forthwith.

Wallace, C. J., and Crockett, J., being disqualified, did not participate in the decision.  