We have read the testimony in this case with care. The motion for the dismissal of the complaint, on the ground that the plaintiff had made no adequate proof that the defendant ever employed him either directly or through an agent, was properly refused by the referee.
Although there was much contradiction of witnesses ; and the testimony of the principal witnesses was not in all things self-consistent, yet there was that shown from which the referee had the right to find directly, or as inference, that the plaintiff was employed by the defendant, or by her husband, as her agent.
Nor is there strength in the position, that as the conveyance of the premises was not delivered to the ■defendant until December 10, 1870, she did not become the owner until then, and that the premises were not subject to a lien for labor and material supplied to her before that date. She was the equitable owner of the premises, by a contract for the purchase thereof, as early as October 6, 1870 (Rollins v. Cross, 45 N. Y.; 766). We have held that a lien can not be acquired for work and materials furnished under a contract with the equitable owner, as against one holding the legal title unless the work or labor is furnished by permission of the latter. But we further held, that if the equitable owner permits the building to be erected, and before notice of lien filed, by the performance of a contract for purchase become the legal owner, the conveyance will be held to relate to the time when the contract of pur*364chase was made, and such equitable owner to be within the statute. The facts of this case bring the defendant within the principle of that decision for all work and material furnished after the execution of the contract of sale.
I do not perceive that the referee made the error claimed by the defendant in his sixth point. It is true that Bramhall did authorize Gfodfrey to employ the plaintiff; but it was for a certain quantity of work specified and limited by him. It appears that the referee has deducted from the amount of the bill rendered by the plaintiff the second and third items thereof. It is probable from the testimony that this was the work ordered by Bramhall, and that this was all that he ordered.
There was no error prejudicial to the defendant in refusing the first amendment to the answer asked for by her counsel. He asked to amend by adding a denial that she was the owner of the house during the period from September 16 to December 10, 3870. Though the amendment was not granted, yet evidence was received which showed the exact status of the defendant for that space of time. The contract under which she became vendee was put in evidence, and all extensions of time for performance indorsed upon it. So was the deed toiler delivered in performance of the contract of sale, and proof of the day of delivery of it. Besides that, though the act under which the proceedings were instituted (act of 1863, ch. 500, p. 859, sec. 5) says that the court shall proceed without regard to matters óf form which shall be amenable at all times without costs while the proceedings progress, yet the issues which are to be tried are not matters of form ; they are of the-substance- of the litigation. The Revised Statutes and the Code of Procedure are very liberal in the power of amendments of pleadings which they give, yet it has-always been held that it was not an abuse of the dis*365cretionary power of the court to refuse an amendment of the pleadings which would introduce an entirely different cause of action or defense. And though they use the word “may,” while this act uses the word “ shall ” in giving the power of amendment, this difference of phraseology does not alter the discretionary power of the court. For this reason the referee was not in error in refusing the second amendment asked by the defendant.
Had it been formally suggested to him in her behalf, that she was an infant at the time of the trial, it would have been his duty, in accordance with the principles of the case cited by the learned counsel for her in this court, to have allowed such action as that fact demanded, so that she should be properly before the court. But there was no suggestion of such fact presented with verification, nor did the somewhat incongruous amendment proposed indicate that she was then nor at the commencement of the proceedings against her, a minor, and so improperly brought into court in person and not represented and defended by guardian ad litem; if there be practice for appointing such guardian for a minor, in proceedings under the act of 1863, which we will not now stop to inquire. From the language of the amendment proposed it would seem that she'had attained her majority. For it avers that since attaining her majority she has not ratified any alleged contract. The proposed amendment was then to set up infancy existing at the time of contracting for the work and material. This, too, it was in the discretion of the referee to refuse, as introducing an entirely new defense.
The defendant makes the point that, as the lien had expired before the referee made his report, there was no authority to render a personal judgment. It has been so held under statutes differing from this of 1863. There are provisions in this act which make a different *366conclusion necessary. The second section provides that all persons having liens, ir order to enforce the same, shall prove their demands in the same manner as in ordinary proceedings at law,. and shall have relief according to their rights as they appear in evidence-judgment is to be rendered according to the equity and justice of the claims of the respective parties among themselves, and against any owner, and so as to determine the rights of all parties and the amount due to each (§§ 5 and 7). It is declared that the contractor and the owner shall be personally liable to the lienor (§ 9). The same section provides that judgment may ■ be enforced by execution,'and the property on which i the lien is adjudged to rest may be sold thereunder, and personal liability may be enforced against the property of any person against whom a personal judgment may have been rendered. These provisions, be- j yond question, contemplate the proving of demands, | the giving judgment for them against the contractor or ) the owner personally, and issuing an execution thereon ^ against any leviable property of the judgment debtor. \
There must be shown to be a lien existing at the J time of the commencement of the proceedings. It is ) thus only that the court obtains jurisdiction. It thus ; acquires jurisdiction of the subject-matter and of the person, and then it may determine the entire contro- . versy. - It does not lose its jurisdiction of the whole matter, because from the length of time for which the proceedings have been pending, the lien, upon the existence of which the jurisdiction at first was based, has ceased. The whole case is before the court, and- it may proceed to give judgment upon the merits. It was so in the court of chancery. When it had acquired cognizance of a suit for t1-" purpose of discovery or injunction, it would, in most cases of account, when in full possession of the merits and with sufficient materials before it, re tain the suit in order to do complete justice between *367the parties, and to prevent useless litigation and expense (Armstrong v. Gilchrist, 2 Johns. Cas., 424, and note in Shepard’s Ed.). This rule had the limitation, that it must be a case in which the court of chancery could properly proceed to a judgment, i. e., where the assistance of a jury was not necessary. In a court which has powers at law, this limitation can seldom apply.
The objection of the defendant, however, goes farther than this. She claims that there is no proof that the labor and materials were all done and furnished within three months before the filing of the lien, and as to that portion thereof without the three months, there was at no time a lien, and being no lien, no jurisdiction acquired by the court as to that, and hence no power to give judgment thereon.
This point does not seem to have been raised before the referee. There is no exception to the report, which specially raises the question. The answer of the defendant, the course of the trial, and the exceptions to the report, show that the defense made was upon the ground that the defendant never employed the plaintiff,, and was, therefore, under no liability to him. The motion to dismiss the complaint presents grounds therefor, but neither of them is that taken for this point.. The referee has found, as a conclusion of law, that the plaintiff had a lien for the amount which the referee-found, as a conclusion of fact, was due to him. He-has found, as facts, that he did work and furnished materials to that amount, and has found no other facts-which, with the evidence in the case, tend to show that there was but one hiring, and that the work and materials furnished was under one contract, and was one continuous performance. It it appeared that the work and materials furnished was by piecemeal, and by different successive contracts, so that at the end of each plaintiff had performed his agreement and had a right *368of action therefor, the claim of defendant, that the time of filing his lien pro tanto had expired, would have some foundation. But this does not appear. Indeed, Godfrey testifies that he had a conversation with the plaintiff, in which he asked the latter what it would cost to do the work. This, it is inferrable, was before the work was done, and in contemplation of all that was to be done and of all that was done, and gives basis for the inference that it was one bargain. If so, then the plaintiff was within the provision of the statute, which permits the filing of a lien within three months after the work is finished or abandoned. If it was an entire work under one contract for all that was done, there was no finishing of it until all that was intended in the contract was performed. Had the point now made been raised before the referee, other evidence might have been produced; his findings would have been more specific, and his conclusions of law might have been different, or they might have been more fully sustained by the findings of fact. As it is, we are not able to say that the point made by the defendant is well taken.
The judgment appealed from should therefore be affirmed, with costs.