
243 Cal.App.2d 142 (1966)
DOLORES Y. HEHR, Plaintiff and Respondent,
v.
RUSSELL T. SWENDSEID, Defendant and Appellant.
Civ. No. 29896. 
California Court of Appeals. Second Dist., Div. Two.  
June 23, 1966.
 Simon & Leanse, Spray Gould & Bowers, Scott Simon and Henry E. Kappler for Defendant and Appellant.
 Richard E. Hodge, H. Walter Croskey and Laurence B. Martin for Plaintiff and Respondent.
 ROTH, P. J.
 Appellant Russell T. Swendseid, an accountant, defendant in the action at bench, as plaintiff in a small claims action against defendant Dolores Y. Hehr, respondent and plaintiff in the superior court action at bench, claimed $150 for professional services rendered prior to July 8, 1963.
 On July 8, 1963, after the small claims action had been on file, respondent complained against appellant in superior court *144 alleging malpractice and fraud in three counts. The gist of all counts in the superior court complaint is that appellant improperly prepared and filed respondent's 1961 federal income tax return as a joint return with respondent's ex-husband instead of separately for respondent, thereby causing respondent to pay taxes for which she was not responsible.
 Respondent, making the averments required and in accordance with Code of Civil Procedure, section 117r, filed an affidavit with the small claims court together with a copy of her superior court complaint and caused appellant's small claims action against her to be transferred to the superior court.
 On August 1, 1963, appellant answered respondent's complaint, denying generally and specifically its allegations. The answer, in addition, pleaded four affirmative defenses. The claim for $150 was not pleaded in the answer as an affirmative defense nor was it set up by way of counterclaim in the answer, or asserted by way of cross-complaint.
 On August 2, 1963, respondent filed a separate action in superior court against her ex-husband, Elmer T. Hehr and appellant alleging fraud and conspiracy to deprive her of her community property (herein called "companion case"). One cause of action in the companion case alleges a conspiracy with reference to the filing of respondent's income tax returns for the tax year 1961.
 On October 11, 1963, with leave of the court, respondent filed a first amended complaint in the action at bench adding a fourth cause of action alleging that by reason of false and fraudulent statements of appellant, respondent paid excessive federal and California income taxes. Appellant answered the amended complaint and pleaded five affirmative defenses, the first three of which embody the substance of the four pleaded to the original complaint. The fourth affirmative defense avers that respondent could obtain a refund from the state if she filed an amended tax return and the fifth elaborated on a written agreement between respondent and her husband to file a joint return. The small claims action was not set out in the answer to the amended complaint by way of affirmative defense or counterclaim, nor was it the subject of a cross-complaint.
 Depositions of both parties were taken during the months of October and November 1963.
 On December 10, 1964, a Certificate of Readiness was filed, signed only by counsel for appellant. Respondent's counsel *145 had refused to sign because he intended to move to consolidate the action at bench with the companion case.
 On December 16 respondent moved to continue the pretrial conference to permit a motion for consolidation. The motion to continue for this purpose was granted. It was heard and denied on January 6, 1965.
 Pretrial conference was held on January 12, 1965. Respective counsel each certified to the necessary conditions precedent. On January 22, 1965, a pretrial conference order was filed and signed. The order included the statement "It is stipulated that there is a counterclaim arising from a small claims action for $150 by defendant against plaintiff." The order set the trial date for March 29, 1965.
 On March 23, 1965, respondent gave notice of her intention to move for reconsideration of the denial of her previous motion to consolidate which had been denied on January 6, 1965. An affidavit of respondent's counsel in support of motion for reconsideration stated, among other things, that: on reconsideration of the facts, it was determined that the first three causes of action, based primarily on negligence, were not pertinent; respondent would move to voluntarily dismiss those causes of action, thus leaving the final cause of action based on fraud; such cause of action was identical to the issues in the companion case, and that to try the same issues twice would be unnecessarily wasteful.
 Appellant in opposition pointed out the certifications made in the joint pretrial statement and stated further: "Your declarant has all his witnesses present, including one witness flown in from Washington, D.C. [Appellant] has acted ... at all times in a manner designed to indicate a willingness to try this case and has prepared it with that end in mind. Defendant's reputation as a professional man and a qualified accountant has been impugned throughout by the allegations of these lawsuits. He is willing and desirous of having these impugnations resolved by a trial on the merits."
 On the date set for trial, March 29, 1965, the motion to reconsider consolidation was heard in department 1 of the superior court and denied. Respondent then also moved department 1 to dismiss her action. This motion was also denied. The cause was continued to March 30.
 On March 30, respondent filed a written request in the trial department to dismiss the action at bench without prejudice. Neither appellant nor his attorney signed the request. Appellant opposed on the ground that since there was a counterclaim *146 on file, no such dismissal could be had. Respondent moved in open court that her request be granted solely on the ground that the small claims action was a separate and distinct action and that the pretrial "... stipulation here is trying to call a horse a cow, and it isn't," and that the effect of bringing the small claims action to the superior court was a consolidation of two cases which "should not be treated as cross-relief actions." The motion to dismiss without prejudice was granted.
 A minute order of dismissal without prejudice was entered on March 30.
 Thereafter, a trial in respect of appellant's $150 claim, in which respondent actively participated, was conducted. It lasted all day.
 On April 6, 1965, a formal judgment dismissing respondent's complaint with prejudice and awarding appellant $150 plus costs against respondent was signed and filed.
 We note that appellant appeals from the minute order of March 30, 1965, reciting the occurrences of that day. We construe the appeal to be from the minute order of dismissal without prejudice filed on March 30 and from the judgment of dismissal thereafter, signed April 6.
 [1a] Code of Civil Procedure, section 581 provides: "An action may be dismissed in the following cases: 1. By plaintiff ... at any time before the actual commencement of trial ... provided, that a counterclaim has not been set up, or affirmative relief sought by the cross- complaint or answer of the defendant. ... 5. The provisions of subdivision 1, of this section, shall not prohibit a party from dismissing with prejudice ... any cause of action at any time before decision rendered by the court. Provided, however, that no such dismissal with prejudice shall have the effect of dismissing a counterclaim or cross- complaint filed in said action or of depriving the defendant of affirmative relief sought by his answer therein. Dismissals without prejudice may be had in either of the manners provided for in subdivision 1 of this section, after actual commencement of the trial, either by consent of all of the parties to the trial or by order of court on showing of just cause therefor."
 Respondent contends and the trial court agreed that the dismissal without prejudice was proper and not in violation of section 581 because there were two separate actions. The small claims action it held was not and could not be treated as a counterclaim to respondent's action. To support this position, *147 respondent in the trial court and on this appeal relies upon Davis v. Taliaferro, 206 Cal.App.2d 764 [24 Cal.Rptr. 197]. The court in Davis did hold "... that there are two separate actions ...", but its holding has been misconceived and misapplied. In Davis defendant in a small claims action filed suit in the municipal court against the small claims plaintiff and invoked the provisions of Code of Civil Procedure, section 117r, to consolidate both in the municipal court. The small claims plaintiff then filed a cross-complaint to the municipal court complaint which cross- complaint invoked the jurisdiction of the superior court. The superior court struck the cross-complaint on the theory that in the municipal court the small claims action was the complaint, the complaint in the municipal court the answer thereto and that therefore the cross-complaint in the municipal court was in effect a cross-complaint to the small claims complaint. The District Court of Appeal reversed and said at page 766: "Appellant contends that when respondent asserted her claim against appellant pursuant to section 117r, respondent commenced a new action in the municipal court and filed therein a complaint to which appellant could plead as to any complaint in a civil action, the result of the procedure being that the small claims action and the municipal court action were in effect consolidated for trial. ... We conclude that appellant's contention must be sustained and the order appealed from reversed."
 Predicated on this case, respondent argues that the claim of appellant for $150 in the case at bench was actually a different suit, commenced prior to the filing of the complaint in the superior court action, and therefore could not be considered a cross-complaint or counterclaim.
 Nothing was said at the trial of the affirmative defenses pleaded in the answer since they are by way of defense. Since, at no time has any argument been advanced that any of them seek affirmative relief, we ignore them.
 Although we pointed out that appellant in his answers to the original and amended complaints did not formally plead his action in the small claims court affirmatively, or by way of counterclaim or cross-complaint, we have called attention to section 117r of the Code of Civil Procedure, which requires removal of a small claims action to the superior court if within the context of that section. And we have also noted that in the pretrial statement it was stipulated that the small claims action would be treated as a counterclaim.
 Section 117r authorizes a consolidation of a small claims *148 action and one in the municipal or superior court only where the "defendant in a small claims action shall have a claim against the plaintiff in such action and such claim be ... of a nature which would be subject to counterclaim or cross-complaint in such action under the rules of pleading and practice governing the superior court. ..." (Italics added.) The italicized portion of the foregoing excerpt indicates that the small claims action is actually in the nature of a counterclaim or cross-complaint when transferred under section 117r. [2a] Respondent, in her motion for removal expressly and implicitly stated as much.
 [3] Further, a pretrial conference order is not a nullity. It "becomes a part of the record in the case and ... controls the subsequent course of the case. ..." (Cal. Rules of Court, rule 216; Witkin, Cal. Procedure (1954) 1965 Supp. pp. 626-627 and cases cited.) The pretrial order "stipulated that there is a counter-claim arising from a small claims action for $150. ..." Respondent insists that the stipulation is an attempt "to call a horse a cow, and it isn't." The cases are replete, however, with instances in which effective stipulations have been made between the parties concerning pleadings and issues raised thereby. In Webster v. Webster, 216 Cal. 485, the court said at page 489 [14 P.2d 522]: "Plaintiff would have us accept the allegations of the supplemental complaint as to the value of the community property, thus indicating, so she asserts, the unequal distribution of the same. This we cannot do. The parties stipulated in open court that the allegations of the supplemental complaint were to be deemed denied. ... Such a stipulation made in open court constitutes 'not only an agreement between the parties but also between them and the court, which the latter is bound to enforce, not only for the benefit of those interested, but for the protection of its own honor and dignity'." (See also Ackerman v. Schultz, 178 Cal. 190, 191-192 [172 P. 609] (stipulation that answer to an amended complaint shall be deemed an answer to cross-complaint); Michelin Tire Co. v. Coleman & Bentel Co., 179 Cal. 598, 603 [178 P. 507] (stipulation to allow amended complaint predicated upon an assigned claim even though the ownership of the assigned claim was in question); Roberts Land & Improvement Co. v. Dallas, 124 Cal.App. 86, 89-90 [11 P.2d 1103] (stipulation that prior foreclosure proceedings were regular); Abalian v. Townsend Social Center, Inc., 112 Cal.App.2d 441, 446 [246 P.2d 965] (stipulation that parties plaintiff were sufficient in number to bring statutory action).) *149 [2b] It is clear from the foregoing cases and others of similar import that the stipulation in the case at bench was proper and operative, wholly independent of respondent's admission when she transferred the small claims action to the superior court.  [fn. 1]
 The question is not whether one can stipulate that a horse is a cow, but whether parties can stipulate that a horse for certain purposes shall be treated as a cow. [4] Unless the stipulation is illegal or contrary to public policy, it is binding. (Estate of Howe, 88 Cal.App.2d 454, 458 [199 P.2d 59].)
 [1b] Unquestionably, had appellant incorporated his small claim as a counterclaim in his answer or cross-complained to respondent's superior court amended complaint, respondent would have been unable to dismiss. Yet appellant clearly had his claim before the court by reason of the consolidation invoked by respondent. We can conceive of no valid purpose, especially in view of the admissions in the transfer proceedings and the stipulation at pretrial, which would be satisfied by requiring appellant to have repeated his claim in either an answer or cross-complaint. (See Witkin, Cal. Procedure (1954) p. 975.)
 The record as outlined, discloses a plaintiff, suing for $150 in a forum designed for expeditious and informal proceedings. He was compelled by respondent to assert his claim in a higher, more formal and more expensive court. Resolution of the claim properly filed in the small claims court was delayed by technical and complex pleadings, discovery proceedings and a variety of formal motions, pretrial proceedings and a pending companion case, all involving a substantial expenditure of time and money. If appellant is properly a defendant in a case involving a fraud, it would appear that respondent who makes the charges, apparently as a defense, among other reasons, to appellant's $150 bill, would insist upon a determination of all the issues. Wholly aside from respondent's objective and especially so if it appears to be used as a subterfuge, appellant, too, is entitled to know where he stands. Instead appellant is told he has no counterclaim, and is ordered to proceed in the superior court on a $150 claim more than two years after he had filed it in the small claims court. Appellant prevailed on his claim and was given judgment for the $150 costs he had sued for and costs, but if his claim was wholly separate from the superior court action, he has a judgment the *150 superior court had no jurisdiction to give. Respondent, however, has succeeded in obtaining a continuance for the resolution of the charges she made against appellant, which she could not obtain by various motions made for that purpose before trial.
 [5] The Legislature has specifically provided that such tactics should not succeed. Subdivision 5 of section 581 allows a party to dismiss with prejudice at any time before decision is rendered by the court, but provides that such dismissal shall not deprive a counterclaimant or cross-complainant of the affirmative relief sought. Read with subdivision 1, which, as we have noted, prevents a dismissal even without prejudice where there is a counterclaim, cross-complaint or answer seeking affirmative relief, it is clear that the Legislature was not so concerned with dismissals per se, as with the final resolution of all issues in the case. By failing to allow for dismissals without prejudice, provided that the cross- complainant or counter-claimant is not deprived of his affirmative relief, the Legislature has said, in effect, that where affirmative relief is sought, the case must be finally resolved either by trial on all issues or by trial of the issue on affirmative relief and dismissal with prejudice of other issues.
 There remains a more sensitive question. Was the dismissal "without prejudice" in fact a dismissal "with prejudice"? The record leaves no doubt that respondent's written request to the clerk and her motion before the court was for a dismissal "without prejudice" and that the court's minute order and formal judgment was a dismissal "without prejudice". The record also, however, leaves no doubt that respondent participated in the trial of appellant's counterclaim. Section 581, subdivision 5 states that after a trial has commenced, there can be no dismissal by respondent, even with prejudice, which would deprive appellant of a trial on his counterclaim. [6] Section 581, subdivision 5 further provides that after a trial has commenced, there may be dismissals "without prejudice ... in either of the manners provided for in subdivision 1 of this section ... by consent of all of the parties ... or by order of court on showing of just cause therefor."
 We have tried to make it clear that respondent could not dismiss without prejudice under section 581, subdivision 1. It is clear that all the parties did not consent to the dismissal. The remaining query is whether there was a showing of "just cause," or more narrowly put, could there be such a showing *151 which would permit a dismissal "without prejudice" by the court when there is a counterclaim on file. We think not.
 Subdivision 5 discloses that a dismissal after trial commences normally results in prejudice unless saved by subdivision 5. Consequently, if failure to meet the "before trial" condition of subdivision 1 results in prejudice, failure to meet the "no counterclaim" condition should also result in prejudice under subdivision 5.
 In short, a dismissal, to be without prejudice, must be both before trial and absent a counterclaim; since a dismissal after trial has commenced is "with prejudice", a dismissal when there is a counterclaim is also "with prejudice."
 [7] Concisely, a dismissal obtained "without prejudice" will nevertheless be "with prejudice" if obtained in contravention of the statute. Since, in the instant case, plaintiff's dismissal was obtained "without prejudice" even though a counterclaim had been set up, it is nevertheless a dismissal "with prejudice" and should be modified to so state.
 Although not on "all fours" with the facts at bench, we believe the cases support this logic. (Fisher v. Eckert, 94 Cal.App.2d 890 [212 P.2d 64]; Carvel v. Arents, 126 Cal.App.2d 776 [272 P.2d 858].)
 In the Fisher case plaintiff filed a dismissal with the clerk after trial had commenced and the judge, without motion being made to dismiss, dismissed the case. On appeal, the court spoke of Code of Civil Procedure, section 581, subdivision 1, and said at page 892:
 "Plaintiff did dismiss it, and without an order of the court, by filing a dismissal thereof with the clerk at a time when plaintiffs alone were not authorized by section 581 of the Code of Civil Procedure to dismiss the action in any other manner than 'with prejudice.' " (Italics added.)
 The plaintiffs in Fisher argued that they intended to dismiss the action only in case the dismissal operated "without prejudice." The court answered at page 893:
 "While plaintiffs in this action may not have intended such result, nevertheless counsel for plaintiffs was presumed to know the law which required the dismissal to be filed 'with prejudice' at the time it was filed, and that any other form of dismissal by plaintiff at that time would be improper under the statute."
 We hold that respondent is bound by what she did and not by what she said. The procedure she adopted and consummated *152 by her actions was the equivalent of dismissal with prejudice, irrespective of how it was labeled.
 The portion of the judgment which awards $150 and costs to appellant is affirmed. The portion of the judgment which dismisses respondent's amended complaint without prejudice is reversed and returned to the superior court with directions to enter judgment for appellant, dismissing respondent's amended complaint with prejudice.
 Appellant is to recover costs on appeal.
 Herndon, J., and Fleming, J., concurred.
NOTES
[fn. 1]  1. Respondent's admission at the very least amounts to an estoppel.
