
    [No. 4,207.]
    THE SOUTH FORK AND PLACERVILLE CANAL COMPANY v. SNOW et al.
    MisronroBB os Pbaintibbs—Nonsuit.—A misjoinder of parties plaintiff, which does not appear upon the face of the complaint, may be pleaded in the answer, and be made a ground of nonsuit against all the plaintiffs.
    Appeal from the District Court of the Eleventh Judicial District, El Dorado County.
    The action was brought to restrain the defendants from diverting the waters of Webber creek at a point above the head of a certain ditch owned by the plaintiffs and used by them to obtain water for mining purposes. The South Fork and Placerville Canal Company was joined with Newton Booth and four others as plaintiffs. The defendant, in his answer, set up a misjoinder of the corporation with each of the other parties plaintiff, alleging that it had no interest in the property described in the complaint. At the trial the plaintiffs failed to prove that the Canal Company had any interest in the property, and after the plaintiffs had closed their evidence, the defendant, upon motion, obtained a judgment of nonsuit against all the plaintiffs, upon the ground that there was a misjoinder of parties plaintiff as set out in the answer. The plaintiffs appealed.
    
      
      George G. Blanchard, for Appellants.
    Section 578, of the Code of Civil Procedure, provides “that judgment may be given for or against one or more of several plaintiffs * * * and may, when justice requires it, determine the ultimate rights of parties on each side, as between themselves.”
    “The object of this provision was to abrogate the common law rule, which the defendant now seeks to have enforced, and to-enable the Court to award justice according to the rights of the parties.” (Peabody & Riggs v. The Washington County Insurance Company, 20 Barb. 339. See also Palmer v. Davis, 28 N. Y. 242.)
    The substantial rights of the defendant cannot be affected by permitting those plaintiffs who have a cause of action, to recover, and it-was therefore the duty of the Court to deny the motion for a nonsuit and render judgment according to the rights of the parties. (Code Civil Pro. Sec. 475.)
    
      George E. Williams, for Respondent.
    The cases cited by counsel for appellants have no application, for the reason, as appears in both those cases and from the New York Code, that misjoinder of parties is not a ground for demurrer, nor can it be set up in the answer. But non-joinder is a cause of demurrer (N.Y. Code, Sec. 144), and, when not appearing on the face of the complaint, can be set up in the answer, and, if established on the trial, is a good defense. (Sweet v. Tuttle, 4 Kernan, 468; Wooster v. Chamberlain, 28 Barb. 602.)
    Our Code provides (Sec. 433) that misjoinder shall be a ground of demurrer, and, when not appearing on the face of the complaint, may be set up in the answer, as in this case. And this Court has held it to be a good defense. (Whitney v. Stork, 8 Cal. 516; Rowe v. Bacigalupi, 21 Cal. 634.)
   The Court

(Mr. Justice Crockett presiding, in the absence of Mr. Chief Justice Wallace) affirmed the judgment.  