The complaint was sufficient to state a, cause of action for the foreclosure of plaintiff’s lien. The objections, thereto are extremely technical, and, if it were necessary, we might regard the complaint as amended upon this appeal in accordance with the proof, for the purpose of supporting the judgment. The fact that the plaintiff furnished the material which is the subject of the lien to the contractor engaged in the construction of the house for the defendant Souther, is not the subject of' dispute, nor is the validity of the lien in anywise attacked. The real point in issue between the parties was as to whether the defendant had paid to the contractor the contract price for the construction of the building before the plaintiff filed his lien. We may assume, for present purposes, that the evidence was insufficient upon which to find that anything remained due and unpaid from the defendant Souther to the contractor at the time when the lien was filed, if the mortgage which was to be given is to be regarded as a payment. The court below has found that the , mortgage was given, not as payment of part of the contract price, but as security, and such finding has support in the evidence. While the contract is not set out in the pleadings, nor was it proved upon the trial, yet the agent of the defendant Souther who executed the same testified that the mortgage was given to secure the payment of the money; and this .finds further corroboration in the acts of the parties thereafter, for after the filing of the lien the defendant Souther paid to the assignee of the mortgage the amount of the same, and this was evidently in fulfillment of the. contract, as it was paid shortly after its completion, and there was talk at that time of settling up all claims and liens upon the property. If the mortgage was given as security for the payment of the contract price, the giving of the mortgage ill the first instance did not constitute a *258payment; and, as the lien was filed before the mortgage was in fact paid, it is to be treated as a stun due upon the contract price, to which the lien would attach. The defendant would not be protected in paying the full amount of the mortgage regardless of plaintiff’s lien.' It also appears from the affidavit of the attorney for the defendant Souther, which was introduced in evidence, that the defendant recognized this condition, as he retained in his hands a sum equal in amount to the plaintiff’s-lien. It is claimed, however, that as the mortgage was assigned to a third party, plaintiff’s lien could not attach thereto, or to the sum secured to be paid thereby. It appeared, however, in the testimony that the assignment was collateral security - for -money advanced by the assignee to the contractor, and the amount so advanced was only the sum of $300; at least the court was authorized so to find, thus leaving the sum of $900, which the plaintiff was still entitled to receive. It is said, however, that the assignment operated to divest the contractor of’ all title to the mortgage; that it ceased, therefore, to represent any payment due upon the contract, and that plaintiff’s lien could not attach thereto. But the assignment of the mortgage did not operate as an assignment of the principal debt; evidently such was not its intention; without the principal debt being transferred, it still existed as an indebtedness due by the defendant Souther to the contractor, and to such indebtedness the lien would attach. (Wanzer v. Cary, 76 N. Y. 526; Sheridan v. Presas, 18 Misc. Rep. 180.) In addition to this, it appears that the mortgage was not assigned until after the lien was filed, and as the mortgage at that time Was collateral < security for the payment of the debt, the lien attached to such indebtedness and the assignee would take it subject to all equities. ■
By virtue of the provisions of the Lien Law (Laws of 1897, chap. 418), no lien is to be extended beyond a year after notice of the lien has been filed, unless an action is commenced to foreclose the lien and a notice of the pendency of such action is filed in the county clerk’s office, or the lien is extended by order of the court. It is to be observed that the notice of pendency is of the existence of the action. It would seem, therefore, that the complaint is not required to state the filing of a notice the purpose of which is to give notice that an action is pending. The notice is improper until the action is begun; and, if *259so, how can the complaint be expected to aver a fact which does not properly exist until the latter is served ? It appeal’s from the recital in the judgment that notice of pendency was filed ; this is sufficient to support the lien. It was averred in the answer, and the court has found, that one William Roles was a lienor, having a mechanic’s lien upon the premises. Roles was not made a party to the action, and the • plea in the answer is of abatement. Section 3402 of the Code of Civil Procedure provides that all lienors having liens against the same property are necessary parties. Roles, therefore, should have been made a party, and when it was made to appear that he held such lien, the plaintiff should'have made application to bring him in, or the court should have done so upon its own motion. His presence was necessary in order to determine the priority of liens as between the lienors (Code, § 3403), and also to protect the rights of the owner. The provision of the Code was, not defeated by the mistake of Roles in naming the wrong owner in his lien; this did'not defeat the lien. (Laws of 1897, chap. '418, § 9, subd. 7.) The plaintiff was excused for not making him a party at the time of the commencement of the action, as a search against the premises did not disclose the lien; there was no excuse, however, for not bringing him in after his lien was made to appear. This must result in a reversal of the judgment. But as the lien of this lienor was for only the sum of seventeen dollars and seventy-five cents and interest, we think that the plaintiff should be permitted to pay and discharge such lien; and if the same is so paid and discharged of record within twenty days after the entry of an order herein, then the judgment will be affirmed.
All concurred.
Judgment reversed and_ new trial granted, unless the plaintiff within twenty days pay or discharge the mechanic’s lien of William Roles, in which case the judgment is affirmed, without costs.