
40 Cal.2d 344 (1953)
LESTER A. PARKER et al., Appellants,
v.
FLETCHER BOWRON, as Mayor of the City of Los Angeles et al., Respondents.
L. A. No. 22294. 
Supreme Court of California. In Bank.  
Mar. 6, 1953.
 David Sokol and Clarence E. Todd for Appellants.
 Ray L. Chesebro, City Attorney (Los Angeles), Bourke Jones, Assistant City Attorney, George William Adams, Alan G. Campbell and John F. Feldmeier, Deputy City Attorneys, for Respondents. *347
 EDMONDS, J.
 The purpose of this mandate proceeding is to compel the respondent city officials to fix a salary or wage for all of the city's employees in certain classifications at least equal to the prevailing scale for similar employment in private industry. The appeal from the judgment of dismissal primarily presents for decision the question as to whether the proceeding is brought by a person or persons having the requisite beneficial interest.
 According to the caption of the petition, the relief is sought by "Lester A. Parker, individually and as a member of, and Secretary Treasurer of, the Council of Federated Municipal Crafts of Los Angeles, California, a voluntary unincorporated association, and for and on behalf of the following members of said association, all of which are unincorporated labor organizations: United Brotherhood of Carpenters & Joiners of America, Local Union No. 2231; United Association of Plumbers and Steam Fitters, Local Union No. 78, Southern California District Council of Laborers; and Carpenters District Council of Los Angeles County, Petitioners."
 The petition is signed by Parker as "Petitioner" and by the "Attorney for Petitioners." It is alleged that the "[p]etitioner, Council of Federated Municipal Crafts" is an unincorporated association, Parker is its secretary treasurer, certain designated unions which are unincorporated associations are members of the council, and "the petitioner brings this action for and on behalf of himself individually and as Secretary Treasurer" of the council "and for and on behalf of" its affiliated unions "and the members thereof."
 The council, it is alleged, is "devoted to the improvement of the working conditions of the members of its affiliated unions, and to the stabilization of labor relations between the City of and County of Los Angeles, and the employees of said political subdivisions, and has as one of its aims and objectives the establishment and maintenance of reasonable standards for wages, hours, and working conditions of said employees, and the maintenance of industrial peace." According to the pleading, the labor council represents those members of the affiliated unions who are working for the city and the county. It is stated that of 2,631 members of the United Association of Plumbers and Steam Fitters, 26 are employed by the city; of approximately 35,000 members of the Carpenters District Council the city employs over 250; *348 and more than 110 of about 11,000 members of the District Council of Laborers are municipal employees.
 "Your petitioners are the real parties in interest herein," it is said, "since they represent a substantial part of the employees of the City of Los Angeles; that petitioner, the Council of Federated Municipal Crafts ... is the collective bargaining representative of practically every craft of employee of the City ... as well as" 28 listed unions. According to the petition, "the sole purpose of the activities of the petitioner, Council of Federated Municipal Crafts ... is to foster, promote, and develop the welfare of wage earners employed by the City ... to improve their working conditions and to advance their opportunities for profitable employment."
 Section 425 of the city charter provides: "In fixing the compensation to be paid to persons in the City's employ, the Council and every other authority authorized to fix salaries or wages, shall, in every instance, provide a salary or wage at least equal to the prevailing salary or wage for the same quality of service rendered to private persons, firms or corporations, under similar employment, in case such prevailing salary or wage can be ascertained."
 According to the petition, "the respondents in fixing the compensation paid to the members of the 'affiliated Unions' ", made a survey of salaries and wages paid by private industry in the Los Angeles area. This survey, it is alleged, disclosed that the rates of pay in private industry were higher than those paid by the city, "in violation of Section 425." The "respondents," it is said, "had available data from which it could ascertain the prevailing salary or wage paid to persons under similar employment for the same quality of services rendered to private persons, firms or corporations, but respondents failed, neglected and refused to pay such prevailing salary or wages and refused to consider, or to take into consideration, such prevailing salary or wages in fixing the salaries or wages of the carpenters, laborers and plumbers." It is alleged that "demand was made on respondents that in fixing the compensation to be paid to the members of the 'affiliated Unions' respondents provide for a salary or wage at least equal to the prevailing salary or wage for the same quality of service rendered to private persons, firms or corporations under similar employment; that at all times since ... respondents have failed and refused to do so."
 "Petitioners have no plain, speedy or adequate remedy at law," the pleading continues, "to compel the respondents *349 ... to perform the public duty which they have under Section 425 of the City Charter ... and there is no method except by means of this petition whereby the petitioners can question the ... acts of respondents and secure complete adjudication of their rights and adequate and complete relief." The "petitioners pray" that a writ of mandate issue commanding the respondents to provide a salary or wage "for all of its employees classified as laborers, carpenters and plumbers" at least equal to the scale prevailing in private industry.
 By answer, the respondents "deny that the petitioner brings this action for or on behalf of himself either individually or as Secretary-Treasurer of the Council ... and deny that the petitioner brings this action for or on behalf of the affiliated unions ... or on behalf of any members thereof or for or on behalf of anyone whomsoever." It is also denied that the council "represents or can represent any members of the said affiliated unions as to their wages, hours and working conditions, or as to the settlement of grievances in connection with the employment of any of them by" the city, county, or various city agencies. The respondents also deny that the council "represents anyone collectively or otherwise either in bargaining for wages, hours or working conditions or otherwise in respect to his employment by any of the said governmental entities."
 Other allegations of the answer are that a survey was made of salaries and wages paid in private industry. The information so obtained, it is said, together with other information, was considered by the members of the city council in reaching the decision that the salaries and wages paid to city employees are at least equal to those prevailing in private industry. According to the pleading, "none of the petitioners is a real party in interest herein, or is employed by the City of Los Angeles, or has any claim herein, nor is any of the petitioners the collective bargaining representative of any employee of" the city or its agencies.
 By supplement to the answer, it is alleged that, since the commencement of the proceeding, the city council has amended the salary standardization ordinance. As now in effect, the ordinance fixes increased rates of compensation.
 Upon the commencement of the trial, the respondents objected to the introduction of any evidence upon the grounds "that the petitioner, Lester A. Parker, is neither a real party in interest nor a party beneficially interested" and that the *350 petition failed to state a cause of action. The court sustained the objection upon both grounds. Judgment was entered discharging the alternative writ, denying the petition and ordering that "the petitioners" take nothing. The notice of appeal recites that the "petitioners," designated in the same manner as in the caption of the petition, appeal from the judgment.
 In the briefs upon appeal, the use of the plural designation "petitioners" is, for the most part, abandoned, reference being made to the "petitioner and appellant" in most instances. However, sometimes the labor council is referred to specifically as the petitioner and at other times the reference to "petitioner" appears to mean Parker. It is contended that the "petitioner," apparently irrespective of whether Parker, or the council, or the affiliated unions be so designated, has the requisite beneficial interest and representative standing to maintain the proceeding and that the petition states a cause of action. It is also argued that the trial court erred in denying the "petitioner" the right to inspect the city's survey records and to take the deposition of one Howard E. Earl.
 The respondents contend that neither the unions nor Parker, whichever be deemed the "petitioner," is a proper party to bring the proceeding and the petition fails to state a cause of action. According to them, the only reasonable interpretation of the petition is that Parker is the sole petitioner. They also argue that the orders claimed to be erroneous are not reviewable upon this appeal.
 It is impossible, either from the caption or the body of the petition, to determine with certainty who is intended to be the "petitioner" or "petitioners." Apparently, it was Parker's belief that, as an individual, he could bring a representative suit upon behalf of all city employees and, as an officer of the labor council, sue on its behalf. There is some indication that the named affiliated unions were not intended to be petitioners, but were considered as represented by the council's action.
 The respondents argue that the council cannot be deemed to be a petitioner because it is simply an affiliation of various unions. No individual city employee can be a member of the council. Also, the respondents say, neither the council nor the affiliated unions can be a petitioner because each is an unincorporated association incapable of suing in its own name. The former contention raises the question of the *351 council's standing to maintain this proceeding; the latter challenges the capacity of the unions to sue.
 [1] Insofar as the question of capacity to sue is concerned, not having been raised by demurrer or answer, it must be deemed to have been waived and cannot now be urged upon appeal. (Code Civ. Proc.,  430, 434; Klopstock v. Superior Court, 17 Cal.2d 13, 17 [108 P.2d 906, 135 A.L.R. 318].) [2] However, the question of standing to sue is different from that of capacity. Incapacity is merely a legal disability, such as infancy or insanity, which deprives a party of the right to come into court. The right to relief, on the other hand, goes to the existence of a cause of action. [3, 4] It is not a plea in abatement, as is lack of capacity to sue. [5] Where the complaint states a cause of action in someone, but not in the plaintiff, a general demurrer for failure to state a cause of action will be sustained. (Klopstock v. Superior Court, supra, pp. 18-19.) [6] This objection is not waived by failure to raise it by demurrer or answer, and may be raised at any point in the proceedings. (Code Civ. Proc.,  434.) Here, by the objection to the introduction of any evidence, it has been properly raised as to whomever may be considered the "petitioner" or "petitioners."
 [7] "The granting of a writ of mandate is discretionary and it will be granted only where necessary to protect a substantial right and only when it is shown that some substantial damage will be suffered by the petitioner if said writ is denied." (Ault v. Council of City of San Rafael, 17 Cal.2d 415, 417 [110 P.2d 379]; May v. Board of Directors, 34 Cal.2d 125, 134 [208 P.2d 661]; Gay v. Torrance, 145 Cal. 144, 147 [78 P. 540].) [8] "The writ of mandate will not be issued except upon affidavit on the application of the party beneficially interested. (Code Civ. Proc.  1086.)" (Fritts v. Charles, 145 Cal. 512, 513 [78 P. 1057].) [9] "The writ of mandate will not issue in a case where the plaintiff fails to show that it will subserve or protect some right or interest of his. ... The writ will not lie 'where it is apparent that the relator has no direct interest in the action sought to be coerced, and that no benefit can accrue to him from its performance.' " (Ellis v. Workman, 144 Cal. 113, 115 [77 P. 822].)
 [10] Parker, as an individual, alleges no facts to show that he has any right or interest in the action sought to be commanded. He does not plead that he is an employee of *352 the city, nor even that he is a resident or taxpayer of the city. There is no indication that any benefit could accrue to him if the writ were issued, nor that he will suffer any detriment if it is denied.
 The situation is clearly distinguishable from that in Hollman v. Warren, 32 Cal.2d 351 [196 P.2d 562], where the petitioner was both an applicant for appointment as a notary and a resident and taxpayer of the city and county. Under those circumstances, the majority of the court held that the petitioner had shown a proper interest to contest the validity of the statute under which the governor refused to consider her application. There, the petitioner had a direct interest in securing consideration of her application in addition to her interest as a citizen in having a sufficent number of notaries commissioned to serve the needs of the public. In the present case, however, Parker cannot benefit directly by an increase in the pay scale of city employees. Neither has he alleged that he is a citizen interested in having the duty in question enforced.
 Parker urges, however, that he has brought this proceeding as a representative suit on behalf of city employees who have a direct interest in the enforcement of the duty. He relies upon the provision of section 382 of the Code of Civil Procedure that, "when the question is one of a common or general interest, of many persons, or when the parties are numerous, and it is impracticable to bring them all before the court, one or more may sue or defend for the benefit of all."
 [11] The statutory provision is based upon the doctrine of virtual representation and is an exception to the general rule of compulsory joinder of all interested parties. (Weaver v. Pasadena Tournament of Roses Assn., 32 Cal.2d 833, 837 [198 P.2d 514].) It is a codification of "the common law theory of convenience to the parties when one or more fairly represent the rights of others similarly situated who could be designated in the controversy." (Fallon v. Superior Court, 33 Cal.App.2d 48, 50 [90 P.2d 858].) [12] "[R]egardless of which of the alternative conditions of the statute is invoked as authorizing a class proceeding, it has been uniformly held that there must be a well-defined 'community of interest' in the questions of law and fact involved as affecting the parties to be represented." (Weaver v. Pasadena Tournament of Roses Assn., supra; Jellen v. O'Brien, 89 Cal.App. 505, 509 [264 P. 1115].) *353
 [13] No facts have been alleged to bring Parker within this well established rule regarding class suits. He does not claim to be a member of the interested class, and there is nothing to indicate that he is "similarly situated" with those whom he pretends to represent. There can be no "common or general interest" in the subject matter of the controversy (Weaver v. Pasadena Tournament of Roses, supra, p. 842) between Parker, who is not employed by the city, and city employees. Parker cannot give himself standing to sue by purporting to represent a class of which he is not a member.
 The cases upon which Parker relies for authorization of a representative action by an individual strengthen this conclusion. In each of them, the individual seeking to maintain the action on behalf of himself and others was a member of the class sought to be represented and raised questions of law and fact common to himself and other members of his class. (Wheelock v. First Presbyterian Church, 119 Cal. 477, 481 [51 P. 841], individual members of a church suing on behalf of all members to recover a fund of money; Weber v. Marine Cooks' & Stewards' Assn., 93 Cal.App.2d 327 [208 P.2d 1009], action by group of members of union on behalf of all members who chose to join with them for declaration of status of constitution and by-laws of the union; Ellis v. American Federation of Labor, 48 Cal.App.2d 440 [120 P.2d 79], members of three unions suing in a representative capacity to enjoin the revocation without a hearing of the charter of the Central Labor Council with which their unions were affiliated; Law v. Crist, 41 Cal.App.2d 862 [107 P.2d 953], members of a group teaching theosophy seeking to enjoin the use by a competing corporation of the name of their society; Peterson v. Donelley, 33 Cal.App.2d 133, 136-137 [91 P.2d 123], action for an accounting and the removal of trustees by one beneficiary of a trust upon behalf of some 3,000 beneficiaries with common interests; West Virginia State Board of Education v. Barnette, 319 U.S. 624, 629 [63 S.Ct. 1178, 87 L.Ed 1622, 147 A.L.R. 674], members of a religious sect suing "for themselves and other similarly situated" to restrain enforcement of laws and regulations against their sect.)
 Two of the decisions cited by Parker are not in point. In Allen v. Hotel & Restaurant etc. Alliance, 97 Cal.App.2d 343, 348 [217 P.2d 699], the court refused to consider the proceeding as a representative suit for the reason that the preliminary injunction appealed from applied only to the named *354 plaintiffs and not to the members of the class whom they purported to represent. Dismissal of a class suit by members of a religious sect seeking to restrain threatened criminal prosecution was affirmed in Douglas v. Jeannette, 319 U.S. 157, 165 [63 S.Ct. 877, 882, 87 L.Ed. 1324], upon the ground, among others, that there was no showing of an identity of issues between the numerous members of the class.
 [14] Insofar as the council and its affiliated unions are concerned, whether one or all of them be assumed to be the petitioner or the petitioners, the same reasoning applies and compels the conclusion that none of them has standing to maintain this proceeding. No facts are alleged which show any right or interest of the unions in the action sought to be commanded. There is no indication that any benefit, except possibly the incidental one of satisfying a very small proportion of their members, could accrue to them if the writ were issued. Nor could they suffer any detriment if it is denied. At best, they can claim to act only on behalf of their members, since they cannot legally be affected by enforcement of the city's duty. None of the unions can have the requisite beneficial interest in enforcing a duty owed by the city to its employees. (Funeral Directors Assn. v. Board of Funeral Directors & Embalmers, 67 Cal.App.2d 311, 313 [154 P.2d 39]; cf. Associated Boat Industries v. Marshall, 104 Cal.App.2d 21, 23 [230 P.2d 379].)
 [15] The council argues that it is a "party beneficially interested" within the meaning of section 1086 under the rule laid down in Board of Soc. Welfare v. County of Los Angeles, 27 Cal.2d 98 [162 P.2d 627]. That case, however, must be limited strictly to the facts upon which it was based. By statute, the Board of Social Welfare was "designated as the single State agency with full power to supervise every phase of the administration of the public assistance plans for which grants-in-aid are received from the United States Government in order to secure full compliance with the provisions of Title 1 and 4 of the Federal Social Security Act." (Welf. & Inst., Code,  103.5.) In upholding its right to sue, the court said: "Generally, when a power or duty is imposed by law upon a public board or officer, and in order to execute such power or perform such duty, it becomes necessary to obtain a writ of mandamus, it or he may apply for the same." (P. 101.) Because of its statutory duty, it was held to be "a proper party to maintain mandamus proceedings against county officials who fail or refuse to issue a warrant *355 to a needy aged person who is a member of a class entitled thereto."
 Here, however, there is no statutory duty of supervision or representation placed upon the unions. They are not public boards but private organizations created to foster the diverse personal interests of their members. As purported representatives of city employees in negotiations with the city, they have no legal standing. The city has no duty to bargain collectively or contract with the unions. (Nutter v. City of Santa Monica, 74 Cal.App.2d 292, 303 [168 P.2d 741].) In fact, it may not do so to the extent that the conditions of employment usually arranged by contract are covered by the provisions of the city charter. (City of Los Angeles v. Los Angeles etc. Council, 94 Cal.App.2d 36, 46-47 [210 P.2d 305].) For these reasons, the unions cannot bring themselves within the rule of the Board of Social Welfare case.
 Relying upon Denver Bldg. & Constr. Trades Council v. Vail, 103 Colo. 364, 368-369 [86 P.2d 267], the labor council argues that a union has sufficient interest in the enforcement of prevailing wage legislation to maintain this proceeding. In that case, a Colorado statute provided that contractors constructing public works must pay the prevailing rate of wages to their employees. Prevailing rates were to be stated in the invitation for bids, and disputes were to be adjusted by the Industrial Commission. The union, which was the collective bargaining agent with contractors for employees in the construction industry, sought an injunction to restrain the state highway engineer from opening certain construction bids. It claimed that the rate in the invitation to submit bids was not the prevailing wage rate and that the dispute should be submitted to the Industrial Commission. At the time suit was commenced, there were neither contractors nor employees for the particular projects involved. The court construed the statutory purpose to be the avoidance of the delays and losses which would result from wage controversies arising during the construction of public works. It concluded that, under the peculiar circumstances existing, the only practical solution to achieve the legislative intent was to hold that the union had a sufficient interest in the subject matter to maintain the proceeding.
 The situation here is in no way similar to that in the Denver Trades Council case. The labor council cannot be the collective bargaining agent for municipal employees. In the present case, there are employees with a present interest *356 in the subject matter of the action. The city charter is vastly different from the Colorado statute in its objective. There is no purpose to be served by a holding that the union may maintain the action, since a sufficient interest reposes in others to seek compliance with the intent of the charter. In the absence of any similarity between the facts pleaded by Parker and the peculiar circumstances of the Denver Trades Council case, it is not persuasive in determining the present controversy.
 Likewise distinguishable for the same reasons is El Paso Bldg. & Constr. Trades Council v. Texas Highway Com., (Tex.Civ.App.) 231 S.W.2d 533, 536-538, which arose upon facts substantially similar to those of the Denver Trades Council case and followed that decision. It is also noteworthy that the Texas Supreme Court reversed the judgment of the Court of Civil Appeals in the El Paso case upon the ground that the action of the highway commission was not subject to review and refused to discuss the question of the union's standing to sue. (Texas Highway Com. v. El Paso Bldg. & Constr. Trades Council, 149 Tex. 457, 468 [234 S.W.2d 857].)
 [16] Equally without merit is the council's contention that it is a proper party to bring a representative suit. Neither it, nor its affiliated unions, are members of the class sought to be represented. Indeed, only a very small number of the members of the affiliated unions are city employees, and there is no allegation that any of them is employed by a department for which the wage and salary scale is established by the city council. For all that appears, it well may be that none of the members of the affiliated unions is a member of the class which is supposedly being represented.
 The decisions from other jurisdictions upon which the labor council relies as stating the proposition that a union may maintain a representative action upon behalf of its members are not in point. United Mine Workers v. Coronado Coal Co., 259 U.S. 344, 392 [42 S.Ct. 570, 66 L.Ed. 975], determined that a labor union, an unincorporated association, could be sued in accordance with the provisions of a federal statute. No question was raised as to the propriety of the association's bringing an action in a representative capacity. In Hague v. Committee for Industrial Organizations, 307 U.S. 496, 514 [59 S.Ct. 954, 83 L.Ed. 1423], the court held that only the individual plaintiffs, and not the labor organizations, could maintain a suit for protection of their civil rights. *357
 Stapleton v. Mitchell, 60 F.Supp. 51, involved an action brought by labor unions and individuals, acting in both individual and representative capacities, to test the validity of a Kansas labor statute which purported to regulate the activities of both the organizations and the individuals. The unions and the individuals all had a direct interest in the enforcement of the statute. There was no question presented concerning the right of a union to sue on behalf of some of its members in a matter in which it had no immediate interest. Again, in Brotherhood of S. Engineers v. City of St. Louis, (Mo. App.) 212 S.W.2d 454, 458, the union had a direct interest in challenging an ordinance which allegedly deprived it of its statutory right. Thus it was permitted to join with individual plaintiffs a number of its officers and members, although its interest was not identical to that of its members. There is no indication in the opinion that it purported to act in a representative capacity.
 Regardless of who may be considered the petitioner or petitioners in this case, it is obvious that none of the parties named in the petition can have any standing to maintain this proceeding. It is, therefore, unnecessary to consider other points presented.
 The judgment is affirmed.
 Gibson, C.J., Shenk, J., Traynor, J., Schauer, J., and Spence, J., concurred.
 CARTER, J.
 I dissent.
 The majority opinion is predicated on two propositions: (1) That in order to obtain relief by mandamus the petitioner must show substantial damage, and it is discretionary with the court whether it shall issue, and (2) petitioner has stated no facts from which it would appear that he would benefit by the relief sought. The remainder of the opinion consists of setting up a row of straw men and knocking them down and omitting an important factor.
 Neither of the premises is correct. For the first proposition the majority relies upon Ault v. Council of City of San Rafael, 17 Cal.2d 415 [110 P.2d 379], and some old cases and erroneously cites May v. Board of Directors, 34 Cal.2d 125 [208 P.2d 661]. The May case did not hold that the remedy of mandamus was discretionary. It held to the contrary. We there said (p. 133): "It has been stated generally in many decisions that whether or not a writ of mandate issues, lies *358 within the discretion of the court. ... Yet it must be remembered that 'The writ must be issued in all cases where there is not a plain, speedy, and adequate remedy, in the ordinary course of law ...' (Code Civ. Proc.,  1086), [emphasis added], and where '... the petitioner has shown that the respondents have refused to perform a clear legal duty not involving the exercise of any discretion. Under such circumstances, the writ should issue.' (Betty v. Superior Court, 18 Cal.2d 619, 622 [116 P.2d 947].) Or, as otherwise phrased, '... where one has a substantial right to protect or enforce, and this may be accomplished by such a writ, and there is no other plain, speedy, and adequate remedy in the ordinary course of law, he is entitled as a matter of right to the writ, or in other words, it would be an abuse of discretion to refuse it.' " (Emphasis added.) On the other hand (necessity of substantial damage), the rule was adopted quoting from American Jurisprudence, " '[B]y the preponderance of authority ... where the question is one of public right and the object of the mandamus is to procure the enforcement of a public duty, the relator need not show that he has any legal or special interest in the result, since it is sufficient that he is interested as a citizen in having the laws executed and the duty in question enforced. ... Generally, when a power or duty is imposed by law upon a public board or officer, and in order to execute such power or perform such duty, it becomes necessary to obtain a writ of mandamus, it or he may apply for the same.' " (Emphasis added.) (Hollman v. Warren, 32 Cal.2d 351, 357 [196 P.2d 562].) The identical statement is made in Board of Soc. Welfare v. County of Los Angeles, 27 Cal.2d 98 [162 P.2d 627]. It should be noted that Mr. Justice Edmonds, the author of the majority opinion here, dissented in the Hollman case and is here stating the same views he expressed in his dissent there.
 Attempt is made to distinguish the Board of Social Welfare case but it cannot be done. There the state welfare board was held to be sufficiently interested to seek mandamus to compel the county to pay aid to needy aged persons although the state board had no authority to require the county to act. The basis of permitting it to bring mandamus proceedings in addition to that above mentioned was because "Persons who are members of such a class are ordinarily financially, and often physically, unable to maintain such proceedings on their own behalf, and to deny to them the assistance of the welfare board under such circumstances would tend to defeat the purpose *359 of the legislation which seeks to provide for them during needy old age." (Board of Soc. Welfare v. County of Los Angeles, supra, 27 Cal.2d 98, 100.) Here petitioner had the specific duty of protecting the welfare of the members of the union, including the employees of the city. It is idle to speak of the lack of power to have collective bargaining between the city and the unions, as does the majority, because that is not here involved. The members of the unions, through petitioner, are properly and legitimately seeking redress in the courts.
 There can be no doubt of the beneficial interest of petitioner. According to the petition for the writ, plaintiff Parker, is the secretary and a member of the Council of Federated Municipal Crafts of Los Angeles, an unincorporated labor union. Several other named unions are affiliated with and members of that union and the action is brought on behalf of all the unions and their members. The unions' purposes are the improvement of working conditions and wages of their members and represents such members as work for the city of Los Angeles. It is the duty of the city council to fix the salaries and wages of plumbers, carpenters and laborers and in doing so it must comply with section 425  [fn. *] of the city charter. In March, 1950, in fixing the wages for such employees the council made a survey in conjunction with the county, city schools, county and city housing authority, of wages paid to persons under similar employment for the same quality of service rendered private persons, firms and corporations, which included data obtained from employers in the Los Angeles area representing the major types of industry and business. The survey showed and it is a fact that the prevailing rate of pay in private employment for the above mentioned work classifications is higher than the rates fixed by the council. Thus the council in fixing the salaries and wages "had available data from which it could ascertain the prevailing salary or wage paid to persons under similar employment for the same quality of services rendered to private persons, firms or corporations, but [the council] failed, neglected and refused to pay such prevailing salary or wages and refused to consider, or to take into consideration, such *360 prevailing salary or wages in fixing the salaries or wages of the carpenters, laborers and plumbers as aforesaid."
 In a mandamus proceeding, on the return to the alternative writ or on the day on which the application for the writ is noticed, the party upon whom the writ or notice is served may answer the petition under oath in the same manner as an answer to a complaint in a civil action. (Code Civ. Proc.,  1089.) "On the trial, the applicant is not precluded by the answer from any valid objection to its sufficiency, and may countervail it by proof either in direct denial or by way of avoidance." (Emphasis added.) (Code Civ. Proc.,  1091.) Here plaintiff made every effort when the case was called for trial to prove facts in support of his petition and to countervail the answers but was prevented from so doing by reason of the sustaining of defendants' objection to the introduction of any evidence; he did not rest the case on the pleadings.
 Defendants seem to think that a plaintiff in a mandamus proceeding must file an answer or reply to the answer or return of the defendant. That is not the law. It has been stated frequently that in mandamus proceedings the return or answer of the defendant is accepted as true, unless controverted by petitioner. (See Hunt v. Mayor & Council of Riverside, 31 Cal.2d 619 [191 P.2d 426]; Ertman v. Municipal Court, 68 Cal.App.2d 143 [155 P.2d 908, 156 P.2d 940]; Vanderbush v. Board of Public Works, 62 Cal.App. 771 [217 P. 785]; McClatchy v. Matthews, 135 Cal. 274 [67 P. 134]; Loveland v. City of Oakland, 69 Cal.App.2d 399 [159 P.2d 70]; Fox v. Workman, 6 Cal.App. 633 [92 P. 742]; Brown v. Superior Court, 10 Cal.App.2d 365 [52 P.2d 256]; Charles L. Donohoe Co. v. Superior Court, 79 Cal.App. 41 [248 P. 1007]; Friedland v. Superior Court, 67 Cal.App.2d 619 [155 P.2d 90].) And a petitioner may file an answer or reply to defendant's answer or return. (Scott v. Superior Court, 205 Cal. 525 [271 P. 906].) That does not mean, however, that a reply to defendant's answer must be filed. That plaintiff may controvert the answer by proof--by evidence--is the plain meaning of section 1091 of the Code of Civil Procedure, supra. The foregoing authorities were dealing with situations where the determination of the matter was submitted by the parties on the pleadings alone or one of the parties made a motion for judgment on the pleadings. The question of whether or not defendant's answer could be controverted by proof without filing a reply or answer to the answer was not presented in any of the cases above cited and it clearly appears *361 from most of them that by reason of section 1091, supra, plaintiff could meet the allegations in the answer by either pleading or proof. (McClatchy v. Matthews, supra, 135 Cal. 274; Vanderbush v. Board of Public Works, supra, 62 Cal.App. 771; Loveland v. City of Oakland, supra, 69 Cal.App.2d 399; Fox v. Workman, supra, 6 Cal.App. 633; Charles L. Donohoe Co. v. Superior Court, supra, 79 Cal.App. 41; Friedland v. Superior Court, supra, 67 Cal.App.2d 619.)
 Since plaintiff was entitled to countervail defendants' answer by proof, though they filed no reply thereto, the denial of a right to put in any evidence, was prejudicial error. Hence, if the facts as alleged in the petition state a cause of action the proceeding should not have been dismissed.
 Plaintiff Parker brings the action individually and as secretary of the Council of Federated Municipal Crafts of Los Angeles, an unincorporated union, referred to as union, having as its members various other unincorporated unions, called affiliated unions. He alleges that he brings the action on behalf of himself individually and on behalf of the affiliated unions and the members thereof; that the union is devoted to the improvement of working conditions and wages of the members of the affiliated unions and they have authorized the union to represent them in achieving those ends; that members of those unions work for the city.
 It thus clearly appears that plaintiff is acting, in effect, as the authorized agent or representative of the members of the affiliated unions, some of whom are city employees, inasmuch as he is an officer and representative of the union which in turn represents the members of the affiliated unions. It cannot be doubted that the members of the affiliated unions, who are employed by the city, are definitely beneficially interested in having their wages and salaries meet those paid in private employment as required by section 425 of the charter, supra.
 The action was properly instituted by Parker as a member of the unions and their members. The union as such operating in Los Angeles has a substantial interest in the wages paid to all in the class of craftsmen, of which the memberships of the affiliated unions consist, whether they are members of the latter or not; similarly each member of the union has an interest in that matter. They have an interest in what the city pays such craftsmen, because what one employer pays his employees has an impact on what another pays or will pay. The phrase "beneficially interested" person who *362 may apply for a writ of mandate (Code Civ. Proc.,  1086) is given liberal construction.
 Moreover, a proceeding is maintainable by Parker as an officer and member of the union and agent and representative of the members of the affiliated unions, including members who work for the city. The interest of such members is common. He would be beneficially interested because those on behalf of whom the proceeding was maintained would have the interest. This is necessary because of the impracticability of all the members joining and the inability of the unincorporated unions to prosecute the proceeding as an association. It is said: "Where there is no statutory authorization of suits by or against an unincorporated association in the association name, the remedy, when a cause of action for or against an association exists, is by an action in the names of the several persons constituting the association, or in the name of a trustee or trustees in whom some right of property is vested or who is specially authorized to sue. ... The doctrine of virtual representation, which recognizes the right of a few persons to sue or defend on behalf of themselves and all others similarly situated, has frequently been applied in the case of actions by or against voluntary unincorporated associations; and it is well settled that where the members of such an association are too numerous to be joined in the action, or where the society is composed of very many members, one or more of the members may sue on behalf of all the interested parties. ... Under this general rule, a suit may be brought by the officers of the association or a committee appointed or authorized to prosecute it." (4 Am.Jur., Associations and Clubs,  48, 49.) Our law provides that "when the question is one of common or general interest, of many persons, or when the parties are numerous, and it is impracticable to bring them all before the court, one or more may sue or defend for the benefit of all." (Code Civ. Proc.,  382.) That provision applies to actions at law as well as equity (Weaver v. Pasadena Tournament of Roses Assn., 32 Cal.2d 833, 837 [198 P.2d 514]), and in regard to proceedings such as mandamus "except as otherwise provided in this title (under which mandamus falls), the provisions of part two of this code (the part in which section 382 appears) are applicable to and constitute the rules of practice in the proceedings mentioned in this title." (Code Civ. Proc.,  1109.)
 In Funeral Directors Assn. v. Board of Funeral Directors & Embalmers, 67 Cal.App.2d 311 [154 P.2d 39], it was held *363 that a nonprofit corporation of funeral directors composed of persons in that business had not sufficient interest to annul by mandamus an order of the State Board of Funeral Directors granting probation to a licensee whose license it had revoked. In Associated Boat Industries v. Marshall, 104 Cal.App.2d 21 [230 P.2d 379], it was held that a nonprofit corporation whose members consisted of those in certain industries who were affected by an administrative regulation had not sufficient interest to attack it in an action for declaratory relief under Government Code, section 11440, authorizing such action by any interested persons. Assuming the correctness of those decisions they did not involve a public duty of general public importance, such as section 425 of the charter, supra, nor were the associations unincorporated and thus without right to sue.
 It is defendants' position that a court will not intervene in this dispute because an ordinance fixing the salaries and wages is legislative and its determination that the salaries fixed are in accord with prevailing rates cannot be questioned except for fraud or corruption; that section 425 of the charter, supra, is directory only.
 In City & County of San Francisco v. Boyd, 22 Cal.2d 685 [140 P.2d 666], this court considered the charter of the City and County of San Francisco which placed the duty to fix salaries and wages on the board of supervisors. It was the duty of the civil service commission to make an investigation and prepare a schedule of rates to be submitted to the board and (p. 688): "The compensations fixed as herein provided shall be in accord with the generally prevailing rates of wages for like service and working conditions in private employment or in other comparable governmental organizations in this state." The salaries and wages fixed thereunder were attacked as being in excess of the prevailing rate elsewhere. It was held that (p. 690): "The determination whether proposed rates of compensation are in accord or in harmony with generally prevailing rates is within the discretion of the rate-making authority. The courts will not interfere with that determination unless the action is fraudulent or so palpably unreasonable and arbitrary as to indicate an abuse of discretion as a matter of law," and (p. 692) "an ordinance is invalid if the mandatory prerequisites to its enactment are not substantially observed." Also, it is implicit in that decision that the charter provision imposed a mandatory duty on the board to adopt a prevailing compensation *364 rate and it has been so interpreted (Adams v. City & County of San Francisco, 94 Cal.App.2d 586 [211 P.2d 368, 212 P.2d 272]; see Adams v. Wolff, 84 Cal.App.2d 435 [190 P.2d 665]). Section 425 here involved is substantially the same as the court considered in City & County of San Francisco v. Boyd, supra, 22 Cal.2d 685, hence it is not necessary to rely upon Adams v. Wolff, supra, 84 Cal.App.2d 435, where the court dealt with an amended version of the San Francisco charter provision. It is clear, therefore, that section 425 is mandatory.
 Defendants contend the standard fixed by section 425 is general and vague, leaving complete and unbridled discretion in the council. It is true that such phrases as "quality of service" and "similar employment" are general and flexible leaving much for determination by the council but a "reasonable or just" correspondence between the rates paid by private industry and the city is to be ascertained. I do not take the same "quality" of service to mean of the same competence or perfection. While that is one of the definitions of "quality," it also means of the same class or nature of service, such as a carpenter. (Webster's Int. Dict., 2d ed., p. 2031.) The prevailing rate may be ascertained and it is done in many cities.
 The question is, therefore, whether the city's action was "fraudulent or so palpably unreasonable and arbitrary as to indicate an abuse of discretion." (City & County of San Francisco v. Boyd, supra, 22 Cal.2d 685, 690.) I believe the petition is sufficient on that point without reaching the question of whether there was an abuse of discretion in fixing the amount of the compensation as compared to that paid in private industry. It will be recalled that it is alleged in the petition, quoted supra, that although defendants had the data of wage rates in private industry and also government units, they refused to give any consideration to it in passing the ordinance. They refused to consider the most cogent evidence available, conduct which would constitute a denial of due process in a judicial proceeding. Certainly such refusal was arbitrary under the test stated in the Boyd case, supra.
 Furthermore, the compensation fixed may be so completely out of line with that prevailing in private industry that the action of the council would be arbitrary and palpably unreasonable under the test stated in City & County of San Francisco v. Boyd, supra, 22 Cal.2d 685. A provision such as section 425 of the charter is, in the language of Justice Cardozo *365 used when he was Chief Justice of the New York Court of Appeals, "... an attempt by the state (the people of the city here) to hold its territorial subdivisions to a standard of social justice in their dealings with laborers, workmen, and mechanics. It is to be interpreted with the degree of liberality essential to the attainment of the end in view." (Austin v. City of New York, 258 N.Y. 113 [179 N.E. 313, 314].) The charter of a city within its proper field is the city's constitution (Adams v. Wolff, supra, 84 Cal.App.2d 435) and the council, the legislative body, must comply with it. It is generally true that the courts will not interfere with a legislative process or determination (see Johnston v. Board of Supervisors, 31 Cal.2d 66 [187 P.2d 686]; Santa Clara County v. Superior Court, 33 Cal.2d 552 [203 P.2d 1]) yet: "The character of the action of the city council, called generally the legislative body, in a particular case depends on the nature of the act or duty and the provisions of the statute under which it is performed. Here the statute makes the distinction between non-legislative and legislative action by directing exercise of the latter function only when the protests are shown to be insufficient."
 "This court in other cases has recognized the division between the administrative or other nonlegislative function preceding the performance of the legislative act where constitutional or statutory requirements were involved. (McFadden v. Jordan, 32 Cal.2d 330 [196 P.2d 787]; Gage v. Jordan, 23 Cal.2d 794 [147 P.2d 387]; Epperson v. Jordan, 12 Cal.2d 61, 64 [82 P.2d 445] and cases cited.)" (American Distl. Co. v. City Council, Sausalito, 34 Cal.2d 660, 665 [213 P.2d 704, 18 A.L.R.2d 1247].) In the Sausalito case the precedent fact to be found by the council was whether protests to annexation by a city of additional territory were filed by the owners of more than 50 per cent of the property in the territory. If there were sufficient protests the territory could not be annexed; if insufficient an ordinance of annexation could be considered by the council. Here the city's constitution (charter) expressly imposes upon the council the duty of ascertaining the rates of compensation in private industry, a specific factual matter. A specific test with which the ordinance must comply is established. If perchance the prevailing rate in private industry cannot be determined which is very doubtful, then it is excused from the requirement by the last phrase in section 425. While it does not expressly provide that it shall first make a finding on that question *366 (and perhaps hold hearings in aid thereof) before it passes an ordinance fixing its employees' compensation, the clear implication is that such a determination must be made either before or at the time of the adoption of the salary ordinance. Indeed the charter provides that the council and other authority authorized to fix salaries shall appoint a representative to the salary standardization committee (the director of the budget is also a member) which grades and regrades the salaries of all classes of employees so that like salaries shall be paid for like duties and makes its recommendation to the council. (L. A. Charter,  123.)
 The facts alleged are sufficient to state a case. It is charged that the council failed and refused to consider the surveys made by it; that according to the surveys and the city's rate of compensation the following appears: plumbers: survey $435 per month, city pay $303 to $375 graduated according to the years of service up to five years with the city; carpenters: survey $369 (now $382) per month, city pay $259 to $319 similarly graduated; laborers: survey, $273.18 (now $287.10) per month, city pay $181 to $221, similarly graduated. Whether there are factors which would defeat plaintiff's claim of similarity of work and pay in private industry or his other allegations is a matter that should be determined on a trial.
 The survey above mentioned was made jointly by the city, Los Angeles County, school district and housing authority. Plaintiff obtained a subpoena duces tecum ordering Howard E. Earl to produce at the taking of his deposition the survey and data upon which it was based. Earl's move to quash the subpoena was granted as to the deposition but as to trial he was required to attend and bring the papers except those parts showing the names and identities of the persons from whom the data was obtained. Apparently, Earl is the assistant chief administrative officer of Los Angeles County and had charge of making the survey. Plaintiff moved for a reconsideration and an order permitting him to inspect and copy the survey. This was denied. Plaintiff complains, on this appeal from the judgment, of those denial orders as being erroneous. Defendants reply that those orders were intermediate and do not affect the judgment or plaintiff's rights and are thus not reversible on appeal from the judgment; further, that as plaintiff took no exception to them he has waived any objection to them.
 It should be observed that the ground for quashing the *367 subpoena for the deposition and in part for the trial was because of the claimed confidential character of the names and identity of the employers from whom the data was obtained, a question considered by this court in City & County of San Francisco v. Superior Court, 38 Cal.2d 156 [238 P.2d 581]. It was there held that the right to inspect public records (Gov. Code,  1227; Code Civ. Proc.,  1888, 1892), did not extend to confidential records under Code of Civil Procedure, section 1881(5), and that the names and identity of the employers furnishing data to the official for ascertaining the prevailing wage rate could and should be withheld. The case refrained from deciding what effect, if any, the withholding of such information would have upon proceedings in mandate attacking the rate of compensation fixed by the city. On that basis alone a portion of the orders of denial could be found valid. Thus the motion for an order to inspect and copy the survey should have been denied insofar as the inspection extended to the names and identities of the employers giving information and the information given by particular employers, but the right to inspect the survey insofar as it related to the method used, the qualifications of the persons making it, all of which were requested by the motion, is clear.
 Under section 1000 of the Code of Civil Procedure an order may be obtained on motion to inspect and copy any paper containing material evidence and in the possession or control of the other party. No appeal lies from an order granting or denying a motion under section 1000 for it is not a final order or judgment in a collateral matter and is not listed as an appealable order in section 963 of the Code of Civil Procedure. (See Collins v. Corse, 8 Cal.2d 123 [64 P.2d 137]; Union Oil Co. v. Reconstruction Oil Co., 4 Cal.2d 541 [51 P.2d 81]; Franchise Tax Board v. Superior Court, 36 Cal.2d 538 [225 P.2d 905]; Estate of Brady, 32 Cal.2d 478 [196 P.2d 881].) While mandamus will lie to attack the order (Austin v. Turrentine, 30 Cal.App.2d 750 [87 P.2d 72, 88 P.2d 178]) such order may be reviewed on appeal from the judgment because it "substantially affects the right of a party." (Code Civ. Proc.,  956.) The granting or denial of a motion to quash a subpoena is not appealable and may be attacked by mandamus (Wemyss v. Superior Court, 38 Cal.2d 616 [241 P.2d 525]), and is reviewable on appeal from the judgment. (Code Civ. Proc.,  956; Brown v. Superior Court, 34 Cal.2d 559, 562 [212 P.2d 878]; see McClatchy Newspapers v. Superior Court, 26 Cal.2d 386 [159 P.2d 944].) *368
 I refer to the orders of denial of the right to inspect in part and quashing of the subpoena in part as affecting the substantial rights of a party. Clearly they do, because one of the very questions at issue is whether the council acted arbitrarily, and necessarily involved therein were the surveys made and the method of making them. Hence, insofar as plaintiff was deprived of his right to take the deposition and inspect the surveys, accepting the names and identity of the employers furnishing data and the rate of compensation of particular employees, the trial court was in error. It is not necessary to decide whether it was necessary for plaintiff to take exception to the orders because the judgment should be reversed on the grounds heretofore mentioned.
NOTES
[fn. *]  *. "In fixing the compensation to be paid to persons in the City's employ, the Council and every other authority authorized to fix salaries or wages, shall, in every instance, provide a salary or wage at least equal to the prevailing salary or wage for the same quality of service rendered to private persons, firms or corporations, under similar employment, in case such prevailing salary or wage can be ascertained."
