Defendant W. L. Hopkins and Independent Brokerage Company, a Washington corporation, agreed orally in 1927 to carry on joint farming operations in Santa Barbara County. The corporation was dissolved in 1936, and its business and assets transferred to a partnership composed of Eugene E. dwell and Murray M. dwell, the plaintiffs in the present action, and Merritt Bloxom. In 1942 the'partnership transferred its business and assets to plaintiffs. The joint farming operations were discontinued in 1937.
In January, 1941, plaintiffs and their partner brought an action against defendants in the Superior Court of Santa Barbara County. Defendants filed an answer and thereafter moved to dismiss the action on the ground that since Independent Brokeragе Company had not qualified to do business in California when it entered into the contract upon which the action was based, the contract was void under the laws then in effect in this state. The motion was heard and both parties introduced documentary evidence. Defendants estab *149 lished that up to December 1, 1942, the corporation had not qualified to do business in this state. The court dismissed the action without making any findings or conclusions of law, and its judgment became final.
Thе present action was begun in January, 1943, upon the same cause of action. In their complaint plaintiffs pleaded the contract entered into by defendant W. L. Hopkins and Independent Brokerage Company, alleged that defendant W. L. Hopkins fraudulently concealed certain facts connected with the joint operations under that contract and prayed that defendants be declared constructive trustees of certain real property for plaintiffs. They also sought an accounting and damages. The complaint took note of the filing and dismissal of the former action. The trial court sustained defendants’ demurrer to the complaint without leave to amend аnd granted their motion to dismiss the action on the grounds that it was barred by the former judgment and that the contract upon which plaintiffs' cause of action depended was void. Plaintiffs appeal.
Plaintiffs contend that defendants’ motion to disjniss the former action amounted to a mere plea in abatement and that the judgment rendered upon that plea was therefore not on the merits and cannot be res judicata in the present action. Ordinarily a judgment of dismissаl is not a judgment on the merits and therefore does not operate as a bar to another action on the same cause of action. This court has recognized, however, that a dismissal may follow an actual determination on the merits
(Goddard
v.
Security Title Ins. & Guar. Co.,
At the hearing upon their motion to dismiss the present action, defendants introduced in evidence the record of the first action. It is clear from that record that the one issue passed upon by the trial court in dismissing the first action was that raised by defendants’ contention that plaintiffs’ cause of action was based upon a contract that was void. The defense thus interposed went to the merits of plaintiffs’ cause of action. Defendants did not merely contend that plaintiffs had no capacity to sue or that they had started their action prematurely or in the wrong court or that that particular action was barred on account of some other technical defect. (See 15 Cal.Jur., Judgments, §183; Rest., Judgments, § 49.) They raised an issue as to plaintiffs’ right to recover under any circumstances upon their alleged cause of action and upon that issue the court rendered judgment against plaintiffs. Plaintiffs point out that the trial judge stated in his memorandum opinion that the issue raised by defendants should be decided “before a trial is had upon the facts.” A decision on the merits, however, is not necessarily a decision upon the facts. It is true that the court did not determine whether, assuming the validity of the contract relied upon by plaintiffs, they were entitled to damages, to an accounting, or to a declaration that defendants held certain property as constructive trustees. Such determination, however, was unnecessary since the court had just determined that plaintiffs were barred as a matter of law from any recovery.
*151
In
Maryland C. Co.
v.
Superior Court,
Plaintiffs contend that in the absence of findings, the former judgment alone may be resorted to for a determination of the issues concluded by that judgment and that, since it purports merely to dismiss the action without giving any grounds for such dismissal, it cannot be res judicata upon any issue of law or fact because a judgment must be held not to have been rendered on the merits when the grounds upon which it was rendered do not appear on its face. It is settled, however, that evidence is admissible to identify the issues adjudicated in a former action.
(Russell
v.
Place,
*152
A final judgment on the merits between parties who in law are the same operates as a bar to a subsequent action upon the same cause of action, settling not only every issue that was raised, but also every issue that might have been raised in the first actiоn.
(Dobbins
v.
Title Guar. & Trust Co.,
Plaintiffs contend that the defense of res judicata cannot'be raised on demurrer in the present action on the ground thаt the facts alleged in the complaint are not sufficient to support that defense. The complaint discloses the number and title of the former action and that it was brought against the same defendants and in the same court as thе present action; that defendants answered plaintiffs’ second amended complaint and subsequently moved to dismiss the action while plaintiffs moved for leave to file a third amended complaint; and that the court granted the mоtion of defendants and denied that of plaintiffs. There is no need to determine whether the demurrer can be sustained on the ground that the record of the former action was incorporated into the complaint by the referеnce to the title and number of that action, or that the court’s refusal to allow plaintiffs to file a third amended complaint is consistent only with the conclusion that defendants had presented such an absolute defense on the merits that no amendment could possibly improve plaintiffs’ position. Assuming that defendants should have raised the defense of res judicata by answer instead of by demurrer and motion to dismiss, the fact remains that to re *153 verse the judgment on that ground would sеrve no useful purpose, since the record of the former action makes it clear that plaintiffs cannot overcome that defense.
Plaintiffs contend that under section 597 of the Code of Civil Procedure they were entitled to a trial of the issue of res judicata. That section provides: “When the answer pleads that the action is barred ... by a prior judgment, . . . or sets up any other defense not involving the merits of the plaintiff’s cause of action but constituting а bar or ground of abatement to the prosecution thereof, the court may, upon the motion of either party, proceed to the trial of such special defense . . . before the trial of any other issue in the casе, and if the decision . . . upon any special defense so tried . . . is in favor of the defendant pleading the same, judgment for such defendant shall thereupon be entered and no trial of other issues in the action shall be had. ...” Although the defense of res judicata in the present action was raised by demurrer and motion to dismiss and not by answer, it was tried at the hearing upon that motion as it would have been tried under the provisions of section 597. The evidence at a trial under thаt section would be the record of the former action, which was introduced at the hearing upon defendants ’ motion to dismiss, and since that trial would take place “before the trial of any other issue, ’ ’ plaintiffs would find themselves in exactly the same position as they are now.
The judgment is affirmed.
Gibson, C. J., Shenk, J., Edmonds, J., Carter, J., and Spence, J., concurred.
Schauer, J., did not participate.
