
41 Cal.App.2d 808 (1940)
GAYLORD F. LLOYD, Respondent,
v.
COUNTY OF LOS ANGELES (a Municipal Corporation), Appellant.
Civ. No. 11544. 
California Court of Appeals. First Appellate District, Division Two.  
December 5, 1940.
 J. H. O'Connor, County Counsel, and A. Curtis Smith, Deputy County Counsel, for Appellant.
 Don Marlin for Respondent.
 Sturtevant, J.
 The plaintiff commenced this action against a large number of defendants. Many of the defendants appeared and answered. No one was served as a fictitious defendant and as to those named as fictitious defendants the action was dismissed. The County of Los Angeles was the only defendant appearing at the trial.
 The plaintiff's complaint was stated in three counts. In paragraph I of the first count the plaintiff alleged the corporate capacity of the County of Los Angeles. In Paragraph II he alleged the capacity of several corporations. Then in paragraph III he alleged: "That said defendants, and each of them, have, or claim to have, an interest in the fund sought to be recovered herein by the plaintiff, but that the nature, character or extent of such interest is unknown to plaintiff." There are no other allegations in that purported count.
 In the second count of his complaint the plaintiff alleged as follows:
 "I."
 "That heretofore on the 5th day of October, 1933 plaintiff recovered from the defendant, Caddo Company, a corporation, in the above entitled court a judgment in the sum of $15,000.00, with interest thereon at 7% per annum from *810 October 5, 1933 until paid; that said judgment was entered on the 10th day of October, 1933 in Judgment Book 872 at page 202 of the records of the above entitled court. That no appeal was taken from said judgment and that the same is now a final judgment, and that the whole of said amount is due, owing and unpaid."
 "II."
 "That heretofore, towit, on the 9th day of February, 1934, the defendant, Caddo Company, a corporation, recovered a judgment in its favor in the sum of $5,368.33 from the County of Los Angeles, State of California; that the said sum is at this time in the hands of the Treasurer of the County of Los Angeles, State of California. That no appeal was taken from said judgment by the County of Los Angeles, State of California, and said judgment has now become a final judgment, and is entered in Book 879 page 77 of Judgments, Los Angeles County, State of California."
 "III."
 "That immediately after the 9th day of February, 1934, the date upon which said judgment was rendered in favor of the defendant, Caddo Company, a corporation, against the County of Los Angeles, State of California, plaintiff by virtue of his judgment heretofore recovered against the Caddo Company, a corporation, garnisheed the moneys, in the hands of the Treasurer of the County of Los Angeles, recovered by the said Caddo Company, a corporation, from the County of Los Angeles, State of California; and that a return upon said garnishment was made by the County of Los Angeles, State of California, to the Sheriff of the County of Los Angeles, State of California, which return showed that said money was being held by the County of Los Angeles, State of California; that after the garnishment levied by plaintiff herein, defendant, Hughes Industries Co., Ltd., a corporation, filed on the 19th day of February, 1934 with the County of Los Angeles a purported assignment, assigning to it by the defendant, Caddo Company, a corporation, any sum or sums which might be recovered by the Caddo Company, a corporation, in its suit against the County of Los Angeles, State of California."
 "IV."
 "That by reason of the said assignment filed by the Hughes Industries Co., Ltd., a corporation, with the County of Los *811 Angeles, the said County of Los Angeles has refused to pay the said sum to plaintiff; that plaintiff is informed and believes and basing this allegation upon that ground alleges that the Treasurer of the County of Los Angeles, State of California, and the County of Los Angeles, State of California makes no claim against and for said sum."
 "V."
 "Plaintiff further alleges that a controversy has arisen relating to the legal rights and duties of the respective parties to this action concerning the right to collect the money in the hands of the Treasurer of the County of Los Angeles, and that this action is brought for the purpose of ascertaining the rights of plaintiff, and further, to prevent the County of Los Angeles from paying to the defendants, or any of them, any portion of the moneys now in its hands as a result of the judgment heretofore recovered by the Caddo Company, a corporation, against the County of Los Angeles, State of California."
 All allegations therein, except paragraph IV, were admitted by failure to deny. Paragraph IV was denied. At the end of his complaint he inserted a prayer that the trial court declare (1) that plaintiff was entitled to collect the judgment against the County of Los Angeles; (2) that the defendants be restrained from collecting it; (3) that Los Angeles County be restrained from paying it until the final order of the court; (4) that plaintiff's title be quieted and that the proceeds be applied on the plaintiff's judgment against the Caddo Company.
 In his third cause of action the plaintiff pleaded fraud. In its answer the defendant denied nearly every allegation contained in that count. It also pleaded counterclaims by which it sought to recover judgment against the Caddo Company for unpaid taxes for the fiscal years 1932 and 1933.
 Prior to the trial the plaintiff and the County of Los Angeles entered into a stipulation of facts. That stipulation was approved by the other defendants. The action was heard on said stipulation and the judgment of the trial court was based solely thereon. In that stipulation it was agreed that paragraphs I, II and III of the second cause of action were true and that the allegations of the said counterclaims were true.
 The trial court rendered a judgment establishing the plaintiff's title to the judgment for $5,368.33 and directed the *812 auditor to pay said sum to the clerk and directed the latter to pay it to the plaintiff.
 [1] The defendant makes the contention, among others, that the plaintiff has sued the wrong parties. We think he has. The clear purpose of the plaintiff's case was to establish his title to, and collect the proceeds of, the judgment theretofore rendered in the action entitled Caddo Company v. Los Angeles County. That judgment could only be paid by the auditor drawing a warrant and said warrant being paid by the treasurer. But neither of those officers, nor the clerk of the court, was a party to this action. As no one of those persons was made a party no judgment could properly be rendered against any one of them. (Woody v. Peairs, 35 Cal.App. 553, 559 [170 P. 660].) True that was a proceeding in mandamus, but the rule regarding necessary parties is not relaxed in actions brought to obtain declaratory relief. (Declaratory Judgments--Borchard, p. 104.)
 [2, 3] As the first count purporting to plead a cause of action to quiet title was wholly insufficient, all that portion of the judgment purporting to establish the title of the plaintiff to the judgment of the Caddo Company v. Los Angeles County has no pleading to rest on and that portion is also invalid.
 [4] The defendant complains because the trial court did not allow its counterclaims. We do not feel called upon at this time to pass on that complaint. As noted above the plaintiff's cause of action should be against the fiscal officers of the county and not against the defendant. Until proper parties are before the court it would be mere obiter to discuss the right to file counterclaims.
 The judgment is reversed and the action is remanded to the trial court for further proceedings not inconsistent with what has been said above.
 Nourse, P. J., and Spence, J., concurred.
