1. As a general rule, an action on a contract must be brought in the name of the party in whom the legal interest in the contract is vested. Civil Code (1910), § 5516; Benson v. Abbott, 95 Ga. 69 (22 S. E. 127); Anthony v. Callaway, 37 Ga. App. 523 (140 S. E. 793); Edwards v. Camp, 29 Ga. App. 556 (2) (116 S. E. 210); Hobbs v. Citizens Bank, 32 Ga. App. 522 (124 S. E. 72). Accordingly, *287an action can not be maintained upon a promissory note payable to the order of a named pierson, which has not been indorsed or otherwise transferred, except in the name of the person to whom it is payable. In the instant case the petition as brought was subject to general demurrer for this reason, and the court erred in not sustaining the demurrer. Allen v. Commercial Credit Co., 155 Ga. 545 (117 S. E. 650), 30 Ga. App. 377 (118 S. E. 499). See Civil Code (1910), § 5689; Wheeler v. Stapleton, 99 Ga. 731 (27 S. E. 724).
Decided June 15, 1928. Rehearing denied July 13, 1928. Underwood, Hem & Qcmbrell, for plaintiffs in error,- George B. Rush, contra.2. The court did not err in striking the plea of res judicata on demurrer. While it is the general rule that the dismissal on demurrer of a previous petition based upon the same alleged cause of action bars a subsequent action, if in sustaining the demurrer the court necessarily decided upon the merits of the case (Fain v. Hughes, 108 Ga. 537, 33 S. E. 1012), the rule is different where the effect of the previous adjudication goes merely to indicate that the cause of action sought to be pleaded was defectively set forth. In the instant ease the plea of former adjudication was bad in that it not only failed to indicate that the court, in passing upon the previous demurrer, necessarily must have decided the merits of that cause (Callaway v. Irvin, 123 Ga. 344 (4) (51 S. E. 477); Macon & Birmingham Ry. Co. v. Walton, 127 Ga. 294 (56 S. E. 419), but, on the contrary, the pleadings embodied in the plea of res judicata themselves indicate nothing more than a previous adjudication to the effect that the cause of action was inadequately set forth.
3. The court did not err in sustaining the general and special demurrers to the answer as amended, except in so far as the judgment related to that portion of the amended answer which set up a rescission of the original contract that formed the consideration of the notes sued on. The amended plea having alleged that the plaintiff and the payee of the notes sued on had released the defendants from liability on the notes, and had accepted the restoration of the bargained property, thus rescinding the original contract, the court erred in striking the amended plea as a whole, and in thereafter directing a verdict in favor of the plaintiff.
Judgment reversed.
Stephens and Bell, JJ., concur.