
210 Cal.App.2d 1 (1962)
DOROTHY von BEROLDINGEN et al., Plaintiffs and Appellants,
v.
LINTON PAUL von BEROLDINGEN, Defendant and Respondent.
Civ. No. 20314. 
California Court of Appeals. First Dist., Div. One.  
Nov. 21, 1962.
 Dorothy von Beroldingen, in pro. per., and George R. Moscone for Plaintiffs and Appellants.
 Sullivan, Roche, Johnson & Farraher, Vincent J. Mullins and Daniel H. Dibert for Defendant and Respondent.
 BRAY, P. J.
 Plaintiffs appeal from orders dismissing with prejudice plaintiff Dorothy von Beroldingen's complaint and plaintiffs' amended complaint.
 Question Presented
 The fundamental question is whether an independent action will lie for child support, including medical expenses, where a divorce court with continuing jurisdiction had made its order for medical expenses only.
 Record
 Plaintiff Dorothy von Beroldingen individually filed against defendant a "Complaint for Money." Defendant filed a demurrer and a notice of motion to dismiss the complaint. The hearing on both was set for February 15, 1961, and on that date continued to March 1. On February 28, plaintiff Dorothy, without asking leave of court, filed an amended complaint for "Child Support." The plaintiffs therein were Dorothy, and "Paul von Beroldingen, a minor, by and through Dorothy von Beroldingen, his mother and guardian ad litem." On March 3 the court made an order, entered March 6, dismissing with prejudice plaintiff's  [fn. 1] original *4 complaint. (The court at no time acted upon the demurrer to this complaint.) Defendant then moved for a dismissal of the amended complaint. On April 6, the court dismissed that complaint with prejudice. Thereafter plaintiff moved to correct the order dismissing the amended complaint by striking therefrom the words "with prejudice." This motion the court denied.
 The Amended Complaint
 The court dismissed the amended complaint on the ground that none of its counts state a cause of action. [1] When plaintiff filed the amended complaint, the original complaint became functus officio. Hence, the court's order dismissing it was proper for the reason that it had been superseded by the amended complaint, even though the court did not dismiss it on that ground. [2] Ordinarily, therefore, we would not be called upon to consider whether the complaint, thus superseded, stated a cause of action. However, here the court's order dismissing the complaint was with prejudice. Hence we are required to examine the complaint to determine if that portion of the court's order should stand. The complaint was by plaintiff individually and contained practically the same allegations as count 2 of the amended complaint. As we hereinafter hold that that count states a cause of action, it follows that the complaint stated a cause of action and therefore the court should not have made the dismissal of that complaint "with prejudice."
 The amended complaint, as before stated, is on behalf of plaintiff and the minor. There are five counts. The first count alleges that the minor resides with plaintiff and is completely dependent for his support, maintenance, education, medical and dental attention, upon the persons charged by law with the duty to pay the reasonable value of such expenses to him, the primary duty resting on defendant, his father. From June 1948, until August 19, 1960, defendant contributed nothing for Paul's support, medical expenses, etc. The final decree of divorce incorporated and made final the provision of the interlocutory decree under which defendant was ordered to pay for the support of Paul. Then follow allegations as to defendant's ability to pay. From 1948 to 1961 defendant became obligated to pay the minor for necessaries of life, to wit, extraordinary medical expenses, the sum of approximately $7,000, which, on demand, defendant refused to pay. Defendant "became obligated to *5 pay minor plaintiff for necessaries of life, to wit, extraordinary medical expenses and incidentals to the same" in the sum of approximately $7,000; "that such obligation of said defendant arose by virtue of the order there[to]fore contained in the aforesaid decree of divorce ... as well as by operation of statutory law; ..." "[I]n lieu of such payment ... [plaintiff] became obligated for such payment ..."  [fn. 2] Minor plaintiff alleges that he ought to be able to reimburse plaintiff, his mother, to the extent of said obligation and to that end defendant ought to be compelled to "repay" to minor plaintiff said $7,000.
 Thus, the gravamen of the first count seems to be that by reason of the divorce decree order and by operation of law defendant is obligated to pay the minor for repayment to his mother of the sums paid by her for the minor's medical expenses. Count 2 differs from count 1 in that it alleges that defendant is obligated by the decree and by operation of law to repay the $7,000 to plaintiff, rather than to the minor plaintiff.
 The third count incorporates the allegations of the first count except as to the allegations concerning the paying out by plaintiff of the approximately $7,000 for medical expenses. It then alleges that defendant became obligated under the divorce decree as well as by operation of law to pay minor *6 plaintiff approximately $30,000 advanced by plaintiff for the support, maintenance, education and recreation of minor plaintiff; that minor plaintiff ought to be able to reimburse plaintiff to the extent of the obligations incurred by her for said purpose "and/or to have such sums held, under authority of this Court, for future disposition ..."
 This count apparently is for payment to minor plaintiff to be by him paid to the mother, of such sums as she has obligated or will obligate herself to pay,--not for medical expenses as in the preceding counts, but for support, maintenance, education and recreation.
 The fourth count differs from the third count in that it is alleged that the defendant is obligated by the decree and by operation of law to repay plaintiff the $30,000 advanced by her for the necessaries of life of the minor.
 The fifth count seeks attorneys' fees and costs for prosecuting in this action.
 Analysis of both complaints, particularly of the amended complaint, divides the demands into three categories: (a) Plaintiff individually is suing for moneys claimed to be advanced by her for medical expenses of the minor. (b) The minor is suing for these moneys to be repaid by him to her. (c) Both plaintiffs are suing for future support of the minor.
 In Thomas v. Thomas (1939) 14 Cal.2d 355 [94 P.2d 510], the defendant by a prior divorce decree was ordered to pay the plaintiff wife $50 per month alimony. For over five years the defendant defaulted. The wife then sued the defendant in an independent action for the accrued alimony and to incorporate in the judgment the provision for alimony as contained in the divorce decree. The court held that the action was proper "as a cumulative right" both to a judgment for the amounts due under the decree and for an order directing payment of the amounts to become due. It was held, however, that in the independent action the court had no power to modify the terms of the divorce decree, but merely to enforce them.
 In Hough v. Hough (1945) 26 Cal.2d 605 [160 P.2d 15], the parties to a divorce action entered into a property settlement agreement in which the husband agreed, among other matters, to pay the wife $200 per month for her support. The interlocutory decree ordered the husband to pay that amount " 'in accordance with the property settlement filed herein, which said property settlement is hereby approved by the Court.' " (P. 607.) Later the husband applied for a *7 modification of the decree. The court by order reduced the payments to $100 per month. Thereafter the wife sued the husband on the agreement to recover the difference between the $200 promised in the agreement and the $100 ordered by the court. The wife obtained judgment in the trial court. On appeal, however, the judgment was reversed, the court holding that the order modifying the divorce decree was res judicata upon the issue as to whether the provision in the agreement for the support of plaintiff was alimony or a part of the property settlement covered by the agreement, and that as the divorce court held that it was alimony, and therefore could and did reduce the amount, an action could not be brought on the agreement. The court stated (pp. 613-614): "Reference has been made in some cases to the issue of whether or not the parties to an agreement incorporated in and ordered performed by the decree may have an independent right of action upon the contract. In some of these cases the issue was mentioned but not decided. [Citations.] In others the agreement was not made an operative part of the decree. [Citations.] Moreover, it was said in the Roberts case [Roberts v. Roberts, 83 Cal.App. 345 (256 P. 826)] at page 351:"
 " 'But it is also the law that either husband or wife may enter into any agreement or transaction with the other respecting property which either might if unmarried (Civ. Code, sec. 158); and therefore, if after scrutinizing the agreement entered into between them for the settlement of their property rights and the circumstances under which it was made, the trial court ascertains and determines that the same is free from the illegal objects and influences above mentioned, it may affirm the agreement [citations], and the force given thereto derives its sanction from the decree made by the court with a knowledge of the facts [citation].' (Emphasis added.) The case of Gummerson v. Gummerson, 14 Cal.App.2d 450 [58 P.2d 394], overlooks the anomalous situation heretofore discussed and is therefore disapproved. ..."
 "From the foregoing discussion it is apparent that plaintiff had no right of action in the instant case on the portions of the agreement incorporated in and made an operative part of the divorce decree. Her remedy was on the decree including such aids as execution, contempt, and other enforcement process of the court together with an action on the decree. Hence, the judgment should be reversed." (Emphasis added.) *8
 Both parties here take comfort from Hough. However, it is a distinct holding that where the settlement agreement is merged in the divorce decree no action will lie upon the agreement but will lie upon the decree.
 Defendant cites no cases holding that an independent action may not be brought on the order or judgment in a divorce case ordering the payment of alimony. [3] However, this action is not for alimony but for medical expenses, a part of child support. We see no reason why where the order is made for payment to the one having custody of the minor, here, the mother, such person may not sue for the enforcement of that order. The payment is to be made to the mother for the benefit of the child and her action is likewise for the benefit of the child.
 Lewis v. Lewis (1917) 174 Cal. 336 [163 P. 42], was an action brought by a minor, through her guardian, to compel the father to contribute to her support and education. Some years before, her mother had been awarded in an action for divorce the custody of the minor and an order requiring the father to pay to the mother for the support of herself and child the sum of $1,050 in certain monthly installments. The mother waived all other claims against the husband. The latter paid the $1,050 in full. The trial court in the independent action ordered the father to pay the minor plaintiff $15 per month and counsel fees. The Supreme Court reversed the judgment on the ground that the divorce court still had jurisdiction to modify its decree and to provide for payment of support for the minor by the father. It stated that where the custody of a child is vested in the mother by a divorce decree, the father is under no obligation to provide for such child beyond that directed by the divorce court, either in its decree or by subsequent modification, and that that court at any time during the minority of the child may make an order requiring the father to contribute to its support. The court further stated: "This does not mean that the natural duty of a father to provide for his minor child is, under our law, finally and absolutely terminated by an award of the custody of the child to the mother. Where such an award is made by a decree of divorce, or in an action for custody without divorce (Civ. Code, sec. 199), the court may, as we have already pointed out, provide at any time during the minority of the children for their support and education by the father, who is deprived of their custody." (P. 340.) *9
 The exclusiveness of the divorce court proceeding where it has made an order concerning a minor is well illustrated in Greene v. Superior Court (1951) 37 Cal.2d 307 [321 P.2d 821], where the divorce court had made an order granting the minor's custody to the mother, and the father, later, attempted to gain the minor's custody through a guardian and ward proceeding. The court said (p. 311): "We find no reason to hold that the continuing jurisdiction of the divorce court over its custody awards is not also exclusive. 'A decree awarding custody to a parent claiming adversely to the other parent differs only in formal respects from a decree appointing one parent guardian of the person of the child. The effect in either case is to confer upon the party appointed the care and custody of the child.' [Citations.]"
 [4] While the mother may sue upon the order made in the divorce court, we find no authority for the minor to bring such a suit. The order provides that the payment for medical expenses be made to the mother. It does not provide for payment to the child. Plaintiffs contend that Fagan v. Fagan (1941) 43 Cal.App.2d 189 [110 P.2d 520], is authority for the right of the minor to sue for support in his own behalf and without there being any order for it in the divorce court. There the mother in a divorce action in Nevada had obtained custody of the minor and an order for the support of the minor, payable monthly. The mother died and the minor's grandmother was appointed her guardian. The minor through her guardian brought an action in this state against the father for freedom from parental authority and for support. The father contended that a parent deprived of the custody of a child by the appointment of a general guardian is relieved of the duty of supporting such child. The court held otherwise, saying (p. 199): "In view of the trend of the more recent decisions, we are impelled to hold that an impoverished and indigent minor child may maintain an action to declare herself free from the dominion of the parent for abuse of parental authority, and for support and education, even though her custody has been previously awarded to a guardian of her person. We are unable to conclude that the mere nomination of a guardian, by a child sixteen years old, which nomination is subject to the approval of the court, constitutes a waiver of her claim to future support from her father who has abandoned her."
 Boens v. Bennett (1937) 20 Cal.App.2d 477 [67 P.2d 715], was a case similar to Fagan in that the action by a *10 minor son against his father for support was based upon section 203, Civil Code, which provides that a child may be freed from the dominion of a parent and the parent's duty of support and education enforced where the parent has abused the parental authority. Neither Fagan nor Boens is applicable here because the causes of action here are not based upon section 203.
 Our discussion so far relates to the right to sue on the order made in the divorce court. That order was limited to payments for medical expenses for the child. [5] We meet a different situation when we consider both the mother's and the minor's alleged causes of action for the minor's support and other necessaries of life, as to which no order of the divorce court has been made. The cause of action is based upon the "operation of statutory law." [6] Lewis as well as Thomas hold that an independent action will not lie where the divorce court has once taken jurisdiction, and that suit will lie only upon an order of that court. The remedy is for plaintiff to apply to the divorce court for an order requiring defendant to pay support and necessaries for the minor. "Any proper modification of the decree of divorce, in the interest of the child, might be ordered on the application of the mother herself, even though she had agreed that the father should not be required to contribute further. [Citations.] The suggestion that the mother might fail to seek provision for the child in the divorce action does not seem to have a very direct bearing here, since the mother is the guardian representing the minor in this action. But if the mother should fail to pursue the remedy, we do not doubt that the child's interest is such that the power to make adequate provision for it may be invoked by a proper representative of the child itself, or may be exercised by the court of its own motion. [Citation.]" (Lewis v. Lewis, supra, 174 Cal. at pp. 341-342.)
 [7, 8] Count 1 in which the minor plaintiff seeks payment of the medical expenses ordered by the divorce court and count 3 in which he seeks payment for necessaries of life do not state causes of action. [9, 10] Count 2, in which plaintiff seeks recovery of medical expenses ordered by the divorce court, does state a cause of action. Count 4 in which plaintiff seeks recovery of necessaries of life does not state a cause of action.
 Defendant contends that plaintiffs had no right without permission of court to file an amended complaint when a *11 demurrer to the complaint and a motion to dismiss were on file. The trial court in the discussion on the motion to dismiss the complaint apparently granted such permission. In later ruling on the motion to dismiss the amended complaint, it is clear that the court felt that such permission had been granted, and dismissed the amended complaint solely on the theory that because of the divorce action an independent action would not lie. In any event, as we hold that count 2 states a cause of action, and it does not state a different cause of action than that in the complaint, the question of whether the minor plaintiff could be added by the amended complaint becomes moot.
 [11] The fifth cause of action incorporates certain allegations of the first and second counts relating to defendant's refusal to pay the minor's medical expenses as ordered by the court and his refusal to pay for the support of the minor, and then alleges plaintiff's inability to pay costs and attorney's fees and defendant's ability to pay them. Section 137.3, Civil Code, provides in part: "During the pendency of any action ... for the custody, support, maintenance or education of children, the court may order the ... father ... to pay such amount as may be reasonably necessary for the cost of maintaining ... the action and for attorney's fees if such relief is requested in the complaint. ..." See Warren v. Superior Court (1955) 132 Cal.App.2d 392 [282 P.2d 207], holding that section 137.3 applies to an action brought by the mother against the father on a court order for support of minor children and that it was not necessary for her to have obtained an order for attorneys' fees and costs in the divorce court.
 It was unnecessary to make a separate count of this request. It could have been included in the second count. However, the fact that it is set forth in a separate count does not justify a dismissal thereof.
 That portion of the order dismissing the complaint which makes the dismissal "with prejudice" is reversed. That portion of the order dismissing counts 1, 3 and 4 of the amended complaint is affirmed. That portion of the order dismissing counts 2 and 5 of the amended complaint is reversed. Plaintiffs will recover costs.
 Sullivan, J., and Molinari, J., concurred.
NOTES
[fn. 1]  1. Unless otherwise noted, "plaintiff" will refer to Dorothy von Beroldingen.
[fn. 2]  2. This first count is uncertain in this (the uncertainty is carried by reference through the other counts): that it first recites that the final decree of divorce "incorporated and made final the provisions of the interlocutory decree of divorce under which defendant was ordered to pay for the support of said minor child; ..." (Emphasis added.) It later alleges: "... defendant above named, became obligated to pay minor plaintiff for necessaries of life, to wit, extraordinary medical expenses and incidentals ...; that such obligation of said defendant arose by virtue of the order therefore [sic] contained in the aforesaid decree of divorce. ..." (Emphasis added.) In the briefs and on oral argument plaintiffs concede that there was no order for support. They contend that by reason of the stipulation made between the parties in the divorce action, in which it was agreed that defendant need not make any payments for the minor's support but would pay for "all extraordinary medical bills incurred for the benefit of said child" the court ordered such payment. Defendant denies that any order was made either for support or medical expenses. However, he annexes to his brief a copy of the said stipulation, at the bottom of which appears "It is so ordered this 13th day of December, 1949. Thos. J. Cunningham, Judge of the Superior Court." Thus the amended complaint is not clear whether it is based on an order in the divorce decrees for support or for medical expenses only, or whether it is based on the later order of December, 1949. For the purposes of this appeal we are required to accept the allegations of the complaint as true. The record does not show whether any demurrer to the amended complaint was filed. The uncertainty shown on the face of count 2 may be cleared up in the court below.
