
    Jack Weisz et al., On Behalf of Themselves and All Others Similarly Situated, et al., Appellants, v Arthur Levitt, as Comptroller of the State of New York, Respondent.
   Appeal from a judgment of the Supreme Court at Special Term, entered August 25, 1976 in Albany County, which dismissed plaintiffs’ complaint. The principal issue presented on this appeal is whether the present declaratory judgment action seeking to declare section 431 of the Retirement and Social Security Law unconstitutional because it excludes lump sum payments for accrued overtime credits from the computation of final average salary for retirement purposes, is barred by the principles of res judicata. In 1974, plaintiff Weisz, on behalf of himself and all others similarly situated, and plaintiff, Civil Service Employees Association (CSEA), commenced a declaratory judgment action to annul section 431 as it related to the inclusion of accrued overtime in the calculation of an employee’s final average salary, and in that complaint the named plaintiff alleged that section 431 violated section 7 of article V of the New York State Constitution which provides that membership in the State pension plan shall be a contractual relationship, "the benefits of which shall not be diminished or impaired.” The 1974 complaint was amended so as to include an allegation as to the manner in which plaintiff Weisz accumulated his overtime. Plaintiffs moved for summary judgment. The motion was denied and summary relief was granted to the defendants. No appeal was taken. The present action was commenced on June 7, 1976. The allegations of the complaint with respect to the exclusion of accrued overtime in the calculation of final average salary being unconstitutional because violative of section 7 of article V of the State Constitution are identical to those contained in the 1974 complaint. The only allegation in the second complaint, urged by plaintiffs to raise an action not encompassed in the first complaint, is the averment that it was the practice of defendant, prior to the enactment of section 431, to include lump sum payments for overtime in the computation of final average salary and that plaintiffs and others relied on such an administrative practice so as to raise the practice to the level of a contractual obligation. It is the general rule that res judicata bars litigation not only of issues litigated, but also issues that might have been litigated in the prior action (Israel v Wood Dolson Co., 1 NY2d 116, 118; Wilkins v American Export Isbrandtsen Lines, 46 AD2d 244, affd 38 NY2d 758). A final judgment in one action, however, will be given res judicata effect in a subsequent action only where the causes of action are the same (Stoner v Culligan, Inc., 32 AD2d 170; Weissman v Friend, 29 AD2d 599). Here, it is apparent from the prayer for relief in each complaint that the cause of action pleaded in each complaint is to declare unconstitutional section 431 of the Retirement and Social Security Law on the ground that it is violative of section 7 of article V of the State Constitution. Thus, to grant the relief demanded in the second action would destroy the right and interests created by the prior judgment. Plaintiffs’ effort to distinguish the two actions on the ground that in the second complaint they have alleged specific facts to establish the existence of a contractual obligation on the part of the defendant prior to the enactment of section 431, must fail. The allegations in the second action do not contain newly discovered facts. Moreover, in order to succeed in the first action, plaintiff Weisz would have had to establish that, prior to the enactment of section 431, he was entitled to the contractual benefit of having his accrued overtime benefits included in the computation of his final average salary. This he failed to do and he cannot relitigate that issue anew (Israel v Wood Dolson Co., supra; Wilkins v American Export Isbrandtsen Lines, supra). Since plaintiffs’ failure to prevail in the first action was based upon a complete failure of proof on an essential element, rather than upon a defect or omission in the pleading, their contention that the dismissal of the first action was not on the merits, is without foundation. Lastly, we must consider whether plaintiff Ehrenpreis, who was not a named party in the first action, is also barred from maintaining this action. The Court of Appeals in Watts v Swiss Bank Corp. (27 NY2d 270, 277) explained that the doctrine of res judicata may be binding upon an individual "whose interests are represented by a party to the action * * * (Restatement, Judgments, §§ 81-90).” Similarly, we held in Stissing Nat. Bank v Kaplan (28 AD2d 1159) that a trustee in bankruptcy represents both secured and unsecured creditors and that a judgment in such an action operates as a bar in a subsequent action by one of the creditors. In this case, it is clear that the interests of plaintiff Ehrenpreis were adequately protected in the first action by his union, CSEA, and he is now barred from maintaining this action. Judgment affirmed, with costs. Greenblott, J. P., Sweeney, Kane, Mahoney and Larkin, JJ., concur.  