
52 Cal.App.4th 165 (1997)
LENDAL GALEN GRAY, Petitioner,
v.
THE SUPERIOR COURT OF SONOMA COUNTY, Respondent; DENNIS R. HUNTER, Real Party in Interest.
Docket No. A075386.
Court of Appeals of California, First District, Division Five.
January 23, 1997.
*167 COUNSEL
Passalacqua, Mazzoni & Gladden, Thomas R. Passalacqua and Lourdes Lopez for Petitioner.
No appearance for Respondent.
Clement, Fitzpatrick & Kenworthy and Clayton E. Clement for Real Party in Interest.
OPINION
SNOWDEN, J.[*]
In this case we hold that a plaintiff's right to dismiss his complaint "at any time before the actual commencement of trial" (Code Civ. Proc., § 581, subd. (b)(1))[1] is cut off by the commencement of evidentiary proceedings before a referee appointed in a partition action.
Petitioner Lendal Galen Gray is a defendant in an action for partition of real property filed by real party in interest, plaintiff Dennis R. Hunter. After an evidentiary hearing before a referee, and the referee's finding and recommendation in favor of petitioner, real party voluntarily dismissed his partition complaint without prejudice. (§ 581.) Petitioner moved to vacate the dismissal on the ground that real party was barred from a voluntary dismissal because trial  the proceedings before the referee  had actually commenced. (§ 581, subd. (c).) Respondent superior court denied the motion to vacate on the primary ground that the proceeding before the referee was not the commencement of trial under section 581, subdivision (c), because the referee's determination is merely advisory to the court. Petitioner seeks a prerogative writ to set aside the order denying the motion to vacate. We *168 issued an order to show cause in lieu of an alternative writ, and heard oral argument. We issue the writ of mandate to direct the superior court to vacate the dismissal and reinstate the complaint.

I. PROCEDURAL BACKGROUND AND FACTS
The litigation below involves the distribution of the Graywood Ranch, the asset of the Gertrude Katherine Gray Trust. The trust terminated upon the death of Ms. Gray, and the property was to be distributed to the three beneficiaries of the trust. Petitioner is one beneficiary; real party is the assignee of one-half of the interest of another. The beneficiaries appear to own the trust property in common.
The property was not distributed upon Ms. Gray's death, prompting real party to file a complaint for partition in April 1995. Real party's complaint sought partition of the property by sale. Petitioner filed an answer to the complaint, and in that answer affirmatively requested there be no partition by sale. Since there are typically only two ways to partition property, by sale or by division (§§ 872.810, 872.820), petitioner's request that there be no partition by sale was, by necessary implication, a request for partition by division. Indeed, petitioner's answer affirmatively requests that petitioner be allotted 37 percent of the fee simple title. Petitioner has taken the position throughout this litigation that this was a request for affirmative relief in his answer, which the partition statutes  contrary to normal pleading procedure  permit.[2]
*169 The parties could not agree whether to partition by sale or by division. Accordingly, in October 1995, the parties stipulated in writing to the appointment of a referee under section 872.820. The referee was to make a recommendation to the court on the question of partition by division or partition by sale. (§ 872.820, subd. (b).)[3]
The referee conducted a two-day evidentiary hearing in April 1996. Seven witnesses testified, five of them experts. Each side argued its case based on the evidence.[4] On May 15, 1996, the referee transmitted his recommendation to the court in the form of an eight-page, single-spaced letter. The recommendation thoroughly reviewed the factual issues in the case (particularly the effect of development, and the problems of development approval, on the value of the property) and concluded that, consistent with petitioner's position and contrary to real party's, partition should proceed by division  not by sale.
Fifteen days later, on May 30, 1996, real party dismissed his partition complaint without prejudice pursuant to section 581, subdivision (b)(1).
Petitioner filed a motion to vacate the dismissal, arguing that section 581 did not apply because trial had actually commenced when the evidentiary proceeding before the referee had begun. In the alternative, petitioner argued that voluntary dismissal was barred because he had requested affirmative relief in his answer. (§ 581, subd. (i).)[5] Petitioner noted that due to the nature of the property and the issues in the case, he had spent almost $30,000 in counsel fees, over $21,000 in witness fees, and almost another $1,000 in *170 costs to prepare for the referee hearing. Petitioner complained that real party's "tactic" of dismissal "if tolerated, would expose [petitioner] to duplicative, annoying, and continuous litigation, [would] burden the trial Court with `fruitless proceedings' and delay the ultimate resolution of the parties' partition claims." Real party opposed the motion on the ground that trial had not commenced because the referee's recommendation was only advisory and not dispositive.
The superior court denied petitioner's motion to vacate, ruling that trial had not commenced because the referee's recommendation was advisory and not dispositive. The court also ruled that it "was not convinced" petitioner's answer sought affirmative relief. The court and the parties agreed there was no case on point, and the law could benefit from clarification. Notwithstanding its denial of the motion to vacate, the superior court observed some dissatisfaction with real party's dismissal: "it kind of sticks in my throat a little bit.... [¶] it kind of bothers me a little bit that this is the tactic that's been taken."
This petition followed.

II. AVAILABILITY OF WRIT REVIEW
(1) Normally, orders or judgments dismissing an action are directly appealable. (See 9 Witkin, Cal. Procedure, supra, Appeal, § 75, p. 99.) If real party's dismissal was appealable, that appeal would have been an adequate remedy (see id., § 111, p. 128), and under general rules of writ review petitioner would not be allowed a second bite of the appellate apple by writ review of the denial of the motion to vacate.
However, a plaintiff's voluntary dismissal under section 581 has generally been held to be nonappealable, on the theory that the dismissal of the action is a ministerial action of the clerk, not a judicial act. (See Parenti v. Lifeline Blood Bank (1975) 49 Cal. App.3d 331, 335 [122 Cal. Rptr. 709], disapproved on other, unrelated grounds Wells v. Marina City Properties, Inc. (1981) 29 Cal.3d 781, 789 [176 Cal. Rptr. 104, 632 P.2d 217]; Associated Convalescent Enterprises v. Carl Marks & Co., Inc. (1973) 33 Cal. App.3d 116, 120 [108 Cal. Rptr. 782].) It has also been held that the defendant cannot appeal the plaintiff's dismissal because the dismissal "has the effect of an absolute withdrawal of [the plaintiff's] claim and leaves the defendant as though he had never been a party." (Cook v. Stewart McKee & Co. (1945) 68 Cal. App.2d 758, 761 [157 P.2d 868] (Cook); accord, Associated Convalescent Enterprises v. Carl Marks & Co., Inc., supra, 33 Cal. App.3d at p. 120.) "[I]t is as though no action had ever been filed." (Cook, supra, at p. 761.)
*171 While the latter theory seems a trifle artificial, the former theory, lack of a judicial act, is a sound basis for nonappealability. Thus petitioner could not appeal from real party's dismissal, but he was entitled to file a motion to vacate the dismissal. The denial of a motion to vacate a nonappealable order is itself nonappealable (see 9 Witkin, op. cit. supra, § 111, at p. 129), and may be reviewed by extraordinary writ.

III. THE MERITS
(2) We must determine whether trial actually commenced in this case within the meaning of section 581, subdivision (b)(1). Subdivision (a)(6) of section 581 defines "trial" as follows: "A trial shall be deemed to actually commence at the beginning of the opening statement or argument of any party or his or her counsel, or if there is no opening statement, then at the time of the administering of the oath or affirmation to the first witness, or the introduction of any evidence." This language "has been held to be illustrative rather than exclusive of the circumstances under which a trial has begun." (Miller v. Marina Mercy Hospital (1984) 157 Cal. App.3d 765, 768 [204 Cal. Rptr. 62] (Miller), citing Wells v. Marina City Properties, Inc. (1981) 29 Cal.3d 781, 785 [176 Cal. Rptr. 104, 632 P.2d 217].) One definition of trial has been "the examination ... of the facts or law put in issue in a cause...." (Tregambo v. Comanche M. and M. Co. (1881) 57 Cal. 501, 505.)
The court in a partition matter must decide between sale or division of the property, which is the primary determination to be made at trial. The court may appoint a referee to make a report on the facts and circumstances of the case, and make a recommendation to the court on precisely this primary determination. (§ 872.820, subd. (b).) Although his or her report and recommendation are advisory, the referee clearly serves as the initial examiner of the facts, and perhaps the law, in a partition action, under the aegis of the appointing court. The referee's determinations are either accepted by the court, modified, or set aside. (§ 873.290, subd. (b).) Given the general role of referees as preliminary examiners of fact, we have no difficulty in concluding that trial in a partition action has commenced once evidentiary proceedings are begun before a referee. Despite the fact that the partition referee's report was not in itself dispositive or tantamount to a final judgment, the trial proceedings began when the parties appeared before the referee to present their evidence.[6]
This case is roughly analogous to Herbert Hawkins Realtors, Inc. v. Milheiser (1983) 140 Cal. App.3d 334 [189 Cal. Rptr. 450] (Herbert Hawkins), in which the Court of Appeal refused to allow a plaintiff to voluntarily *172 dismiss his complaint in the wake of an unfavorable arbitration hearing. While the court did not address directly the question whether an arbitration proceeding was a "trial" for purposes of section 581, the court found the dismissal mocked the integrity of the arbitration process, produced an absurd result, and promoted "mischievous lawyering." (Herbert Hawkins, supra, 140 Cal. App.3d at p. 339.) The precise rationale for Herbert Hawkins's holding was that section 581 did not apply to arbitration, because the arbitration statutes were more specific: the latter statutes provided that the only way to deal with an unfavorable arbitration award was to request trial de novo, and a section 581 dismissal would undermine the integrity of this statutory provision. Still, the court was very concerned with the policy of allowing a plaintiff to dismiss his suit after a full factual hearing, simply because he or she did not like the result.
Several decisions have reached similar conclusions in two types of cases: those in which allowing a dismissal would frustrate a statutory scheme, and those in which courts interpret "trial" so broadly as to include certain proceedings at the stages of pleading or discovery. An example of the first type of case is Mary Morgan, Inc. v. Melzark (1996) 49 Cal. App.4th 765 [57 Cal. Rptr.2d 4], a recent decision of this district. Mary Morgan, citing Herbert Hawkins with approval, held that a plaintiff may not dismiss a complaint where the defendant has met its initial burden of entitlement to summary judgment, and the plaintiff has been granted a continuance to obtain new evidence to meet its counterburden. (49 Cal. App.4th at pp. 767, 770-772.) The court concluded that a voluntary dismissal under such circumstances would "eviscerate the summary judgment procedure." (Id. at p. 771.) Similarly, in Hartbrodt v. Burke (1996) 42 Cal. App.4th 168, 175-176 [49 Cal. Rptr.2d 562], the court held that a plaintiff may not defeat a defendant's motion for a terminating discovery sanction by filing a voluntary dismissal just before the sanction hearing; to allow dismissal would denigrate the discovery statutes.
In the second type of case, courts have defined the term "trial" in section 581 so broadly as to encompass certain pretrial proceedings that were dispositive of a case. In Miller the court found the plaintiff had lost the right to dismiss after it had admitted facts under section 2033 which were dispositive of its complaint and dictated a judgment for defendant. In other cases the word "trial" has been defined to include a "trial of law" on the pleadings. In Wells v. Marina City Properties, Inc., supra, 29 Cal.3d at pages 789-790 (Wells), the Supreme Court held that a general demurrer, sustained without amendment, effectively disposed of a plaintiff's case and cut off his *173 right under section 581 to dismiss without prejudice and refile. (See also Cal-Vada Aircraft, Inc. v. Superior Court (1986) 179 Cal. App.3d 435 [224 Cal. Rptr. 809].)[7]
The thread running through all these cases seems to be one of fairness: Once the parties commence putting forth the facts of their case before some sort of fact finder, such as an arbitrator, or at the pretrial stage a ruling is made on an issue of law or on admitted facts which effectively disposes of the plaintiff's case against him, it is unfair  and perhaps a mockery of the system  to allow the plaintiff to dismiss his complaint and refile. While our system is adversary and grounded on vigorous disputation, it is also dedicated to justice and grounded on the fundamental fairness of its proceedings.
The thread of fairness is twisted out of true by the facts of this case. Here the parties spent two days litigating their case with seven witnesses. The referee made detailed recommendations of factual findings to the court. The referee was the factfinding arm of the court. Doubtless had real party prevailed before the referee, he would not have dismissed his complaint. To allow real party to dismiss in the wake of an unfavorable referee's recommendation would work an injustice. Trial had "actually commenced" within the meaning of section 581 and within the policies of fairness in the cases set forth above. Moreover, a dismissal under section 581 denigrates the partition statutes, which provide that a party dissatisfied with a referee's report may move that it be modified or set aside, and that the court may order a new report or appoint a new referee. (§ 873.290.) A dismissal circumvents this statutory scheme.
We hold that trial has actually commenced, thus cutting off a plaintiff's right to voluntary dismissal, when the parties appear and present evidence before a referee in a partition proceeding.
We further hold, in the alternative, that the dismissal in this case was inappropriate because petitioner had requested affirmative relief in his answer. The superior court referred to Tamraz (see fn. 5, ante) at oral argument *174 below and concluded it "was not convinced" petitioner's answer sought affirmative relief. We disagree with this conclusion. The answer not only requests there be no partition by sale, but twice affirmatively requests partition by division, in the form of 37 percent of fee simple title to petitioner. As noted above, affirmative relief may be requested in an answer in partition proceedings. (§ 872.430; see fn. 2, ante.)
Real party argues the reasoning of Tamraz does not apply here because that case is limited to proceedings, such as family law, which do not allow for a cross-complaint. Without citation to authority, real party contends that a cross-complaint is authorized in a partition action. Because section 581, subdivision (i) requires the request for affirmative relief to be in the cross-complaint, real party argues, in effect, that petitioner may not invoke the subdivision because he requested the affirmative relief in his answer. This argument is specious. Petitioner only did what the partition statutes allowed him to do, consistent with a legislative intent to make cross-complaints unnecessary by allowing affirmative relief requests in an answer. (See fn. 2, ante.)

IV. DISPOSITION
Let a writ of mandate issue commanding respondent superior court to vacate its order denying petitioner's motion to vacate the dismissal, and to enter a new and different order granting the motion to vacate and vacating the dismissal of real party's partition complaint. Petitioner shall recover his costs of this writ proceeding.
Peterson, P.J., and Haning, J., concurred.
NOTES
[*]   Judge of the Napa Superior Court, assigned by the Chief Justice pursuant to article VI, section 6 of the California Constitution.
[1]  All undesignated statutory references are to the Code of Civil Procedure.
[2]  Section 872.430 provides: "The answer may set forth any claim the defendant has for contribution or other compensatory adjustment." The legislative committee comment to the section states that the statute "avoids the need of the defendant to file a cross-complaint for affirmative relief. Compare Section 431.30(c) (affirmative relief may not be claimed in the answer)." (Legis. Com. com., Deering's Ann. Code Civ. Proc. (1996 ed.) foll. § 872.430, p. 214.)

At oral argument, real party stated he did not interpret petitioner's answer to request affirmative relief. Specifically, real party claims the answer asks for partition by division only with some equivocation, and even then only in the prayer. By implication, real party seemed to contend that even if unequivocal, a request for affirmative relief made only in the prayer of a pleading, not in the body of allegations or denials, is invalid.
Petitioner's request for affirmative relief was neither equivocal nor limited to the prayer of the answer. In the body of the answer, in paragraph 4, petitioner prays as follows: "Defendant [i.e., petitioner] requests allotment of thirty-seven percent (37%) of the fee simple title to the subject property." This is a clear, unequivocal, and affirmative request that the court partition the property by division, and not by sale as requested in real party's complaint. In the prayer of the answer, petitioner prays "[t]hat there be no partition by sale of the property" and that in the event of partition by division he receive 37 percent of fee simple title.
Contrary to real party's implication, a prayer is not an irrelevant portion of a pleading. It does not cure an insufficient pleading, but it can be of value to, e.g., clarify and support the pleading's allegations. (4 Witkin, Cal. Procedure (3d ed. 1985) Pleading § 447, pp. 491-492.) In the present case, however, the answer included clear and affirmative requests for the affirmative relief of partition by division in both the body and the prayer of the pleading.
[3]  Section 872.820, subdivision (b) provides that the court in a partition action may order partition by sale, not by division, if "The court determines that, under the circumstances, sale and division of the proceeds would be more equitable than division of the property. For the purpose of making the determination, the court may appoint a referee and take into account his report."
[4]  The parties dispute the precise nature of the proceeding. In declarations filed below, real party's attorney stated that none of the seven witnesses testified under oath and that "the rules of evidence were observed by coincidence, if at all"; in contrast, petitioner's attorney stated the hearing "was conducted in the same manner as a trial before a court ... [o]pening and closing statements were made, witnesses were examined and cross-examined, and evidence was introduced." The referee's report indicated each party presented "arguments and testimony through ... witnesses." Whether the rules of evidence were assiduously followed or not is not the issue here: the issue is whether, regardless of any alleged informality of the proceedings, the presentation of evidence before a referee was tantamount to the commencement of trial.
[5]  "No dismissal of an action may be made or entered, or both, under paragraph (1) of subdivision (b) where affirmative relief has been sought by the cross-complaint of a defendant...." (§ 581, subd. (i).) In In re Marriage of Tamraz (1994) 24 Cal. App.4th 1740, 1746-1747 [30 Cal. Rptr.2d 233] (Tamraz), the court held that subdivision (i) must apply to proceedings, such as family law matters, which do not allow for cross-complaints but which do allow for a request for affirmative relief in the answer.
[6]  Real party's reliance on Gherman v. Colburn (1971) 18 Cal. App.3d 1046 [96 Cal. Rptr. 424], is misplaced. That case involved a voluntary dismissal after a chambers conference the morning of trial. No evidence was presented at the conference and no opening statement was made. Gherman is clearly distinguishable from the facts now before us.
[7]  In the so-called "trial of law" cases, the legal issues must be joined such as to effectively dispose of the rights of the parties before the contest is elevated to a "trial" from the level of mere legal disputation. Thus, the requirement that the issues "effectively dispose" of a case applies only to pretrial rulings on the pleadings, such as the demurrer ruling in Wells. The requirement does not apply to the other two types of cases discussed above, i.e., those in which trial has begun because evidence has been taken before an examiner of the facts, or those in which a dismissal is inappropriate because it would denigrate another statutory scheme, such as summary judgment or arbitration.

Real party argued below that trial had not commenced because the referee proceedings could not "effectively dispose" of the case because they were only advisory. The superior court rejected this argument at oral argument, stating the question was whether the factfinding proceedings before the referee were a "trial," and that the "effectively dispose" language from the cases involving pretrial rulings did not precisely apply. The superior court was correct.
