1. While, in the language of the Civil Code (1910), §§ 4335 and 4336, in a defense of res judicata the subject-matter in issue in the former suit must have been “between the same parties,” and in a defense of estoppel by judgment the judgment must have been “between the same parties [or] their privies” (Callaway v. Irvin, 123 Ga. 344, 51 *474S. E. 477; Brenau Association v. Harbison, 120 Ga. 929, 932, 48 S. E. 363, 1 Ann. Cas. 836; Hamlin v. Johns, 41 Ga. App. 91, 151 S. E. 815), yet it is not required that all the parties on the respective sides of the litigation in the two eases shall have been identical, and it is sufficient as to identity of parties if those by and against whom the defense is invoked in the later case were real parties at interest or privies as to the controversy in the former case. Thus, the joining of another party, especially a merely nominal party having no interest in the subject-matter, in either the former or the later case, will not prevent a bar as to the same controversy as between real parties at interest or privies in both cases. See Chatman v. Hodnett, 127 Ga. 360 (3) (56 S. E. 439; 15 R. C. L. 1010, 1012, §§ 483, 485). Accordingly, the unnecessary joining in the former ease, brought by the same plaintiff, of a third person or agent of the defendant corporation, which corporation is the sole defendant in the instant case, would not render the former controversy one between different parties, so as to take the ease from within the operation of such a defense.
2. It is a general rule that, where a demurrer to a petition contains several grounds, some going to the merits and some special, and the court sustains the demurrer and dismisses the petition, there is no presumption that the ruling is based on the special grounds of the demurrer rather than the general, and the judgment will be treated as sustaining the entire demurrer on all the grounds. Sparks v. Fort, 29 Ga. App. 531, 535 (116 S. E. 227). In the instant case it specifically appears from the petition itself as amended that a previous suit was brought in a justice’s court “on the same cause of action.” It also appears from the present petition and the attached copies of the pleadings in the former suit that a general and special demurrer was filed to the original summons in the justice’s court, and that, after the summons was amended in the justice’s court and a judgment was rendered for the plaintiff, the superior court on appeal entered an order sustaining the demurrer generally and dismissing the suit, from which ruling of the superior court no writ of error was taken. Consequently the court, by sustaining the general demurrer to the former action, necessarily decided the merits of the case in favor of the defendant. Civil Code, § 4338. It can not be assumed that the superior court committed an error by dismissing the suit only on the special demurrer without giving to the plaintiff any opportunity to amend. Wardlaw v. Executive Committee, 47 Ga. App. 595 (3) (170 S. E. 830).
3. The foregoing facts being made to appear on the face of the present petition, it was subject to the general demurrer now interposed, and was properly dismissed by the judge of the municipal court. Williams v. Cheatham, 99 Ga. 301 (25 S. E. 698) ; Reid v. Caldwell, 120 Ga. 718 (4) (48 S. E. 191). If the petition disclosed on its face a defense, not of res judicata, but a mere personal defense such as a bar by the statute of limitations or that the contract sued on was made by the defendant during minority, the rule as to the method of setting up the defense would be different, and in the latter cases the defense would have to be specially pleaded either by a special demurrer or by plea. Smith v. Central of Ga. Ry. Co., 146 Ga 59 (90 S. E. 474) ; Marks v. Talmadge, *4758 Ga. App. 557 (2), 559 (69 S. E. 1131). The reason why the defense of res judicata when it appears on the face of the petition can be taken advantage of by general demurrer is that such a defense is founded at least partly on public policy, and the rule is one in which the courts and the public have an interest. Hart Steel Co. v. Railroad Supply Co., 244 U. S. 294, 299 (37 Sup. Ct. 506, 61 L. ed. 1148) ; Terrell v. Nelson, 199 Ala. 436, 440 (74 So. 929); Webb v. Buckelew, 82 N. Y. 555, 559; Martin v. Evans, 85 Md. 8 (36 Atl. 258, 36 L. R. A. 218, 60 Am. St. R. 292). What was held in Sumner v. Sumner, 121 Ga. 1 (6), 10 (48 S. E. 727), to the effect that the defense of res judicata can not be taken advantage of unless '“specially pleaded,” is not contrary to this holding, since, as appears in that ease, the petition did not, as here, in any wise disclose the former adjudication, and the ruling goes merely to the effect of holding that the facts of such a defense must specifically appear on the face of the pleadings. This is clearly apparent from the language of the Supreme Court in Prisant v. Feingold, 169 Ga. 864, 867 (151 S. E. 799), where it was said: “That a plaintiff can not maintain a pending action because the subject-matter thereof had been previously adjudicated in favor of the defendants is a defense which must be set up by special plea, unless the facts on which it is based appear on the face of the petition.”
Decided November 24, 1934. Rehearing denied February 2, 1935.3. The court erred in sustaining the certiorari, thereby in effect overruling the judgment of the municipal court sustaining the demurrer to the petition. Judgment reversed.
Stephens and Sutton, JJ., concur. Marlin, Marlin & Snow, for plaintiff in error. John J. McCreary, contra.