This action was brought to foreclose a mechanic’s lien on premises owned by the defendants Sullivan and Kraus. The respondent Adler, who also had a lien, was made’ ¡a party defendant, and he served upon his codefendants, Sullivan and Kraus, an answer setting forth his lien and his claims thereunder. Notices of trial were served both by the plaintiffs and defendants, Sullivan and Kraus, *317but neither served any notice therefor on the defendant Adler. The cause was placed upon the calendar, and when it came to be finally reached — the plaintiffs’ lien having been .satisfied — the ' defendants Sullivan and Kraus moved to dismiss the complaint, which motion was granted and judgment entered to that effect. Thereupon Adler moved to vacate such dismissal as to himself and to restore the action so that he might try the issues existing between himself and his codefendants, Sullivan and Kraus. His motion was granted and I think properly.
■ The provisions of the Code of Civil Procedure relating to the enforcement of mechanics’ liens on real property provide that in an action in a court of record the plaintiff must make all lienors having liens against the.same property or any part thereof parties defend- - ant, and that if several actions are brought by different lienors in a court of record, the court in which the first action was brought may, upon its own motion or' upon the application of any party in any of such actions, consolidate all of such actions into one. (Code Civ. Proc. §§ 3401, 3402.) On the trial of such án action the court may adjust and determine the equities of all the parties and the order of priority of different liens and determine the issues raised by any. defense or counterclaim in the action. (Code Civ. Proc. § 3403.) One lienor having brought an -action to foreclose his lien against the owner and contractor, must necessarily make parties defendant all other lienors and the court is required to -determine the rights of all with respect to amounts and priority of liens.. Necessarily the lienors made defendants, as well as the lienors who bring the action, look to the property to satisfy their liens and whatever controvérsy there may be as to the -amount of liens is directed against the defendant owners.
Section 521 of the Code of Civil Procedure provides that in any action where the- judgment may determine the ultimate rights of two or more defendants as between themselves, answers may be. served upon the codefendants and the controversy thus raised determined, but that such controversy shall not delay a judgment to which the plaintiff is entitled unless the court otherwise directs. This provision was. evidently designed to .prevent multiplicity of actions. This being so with respect to ■ ordinary actions in which conflicting rights of defendants can be determined, it is particularly *318applicable to actions for the enforcement of mechanics’ liens where spch rights must-be determined.
The defendant Adler, having served his answer setting up his demand upon his codefendants, Sullivan and Kraus, was entitled to have the issues thus raised determined. No notice of trial- having' been served upon him, either by the plaintiff or his codefendants, • Sullivan and Kraus, the latter were not in a position to dismiss the action and thereby prevent him from having his rights determined. (Edwards v. Woodruff, 90 N. Y. 396; Ostrander w. Hart 130 id. 406; Mahoney v. Mc Walters, 91 Hun, 247.)
But it is said-that Adler waived his rights in this regard because' a clerk from the office of his attorneys was in court when the order of dismissal was taken and madé no objection. The affidavit of the clerk frankly states that hu misapprehended the situation. and, thought, because the client of his office, was a defendant, it was desirable the complaint be dismissed. Such act did not satisfy Adler’s claim against his codefendants and, even if it. Could be said that it forfeited his right to prosecute such claim, the court at Special Term had the right to relieve him from .the mistake made, and having done-so, the discretion exercised by it,, under the facts presented, ought not tp be interfered with.
The order should be ' affirmed, With ten dollars costs and disbursements. > . .
O’Brien, P. J., Patterson, Ingraham and Laughlin, JJ., concurred. ’
Order affirmed, with ten dollars costs and disbursements.