This is an action to enforce a mechanics’ hen. The defendant Aubrey entered into a contract with Packard, Bayley & Simpkins, also defendants, to erect a building, known as the “ Marysville Water Works,” agreeing therein not to sublet any part of the work without the written permission of the latter. The contract also contained the following agreement on the part or Aubrey: “ The said first party hereby agrees he will not incumber er suffer to be incumbered the said building or lot on which it is erected, by any mechanics’ hens or debts of material, labor-men, contractors, sub-contractors, or otherwise.” Aubrey sublet the brick work to the intervenor, Craft. Ho written permission for this sub-contract appears to have been given by Packard, Bayley & Simpkins, yet they seem to have recognized Craft as a sub-contractor. Bowen, the plaintiff, furnished to Aubrey materials for the construction of the building, and commenced this action to enforce a hen therefor. Craft, by leave of Court, filed his complaint of intervention, claiming a hen upon the property for the work done by him, as subcontractor under Aubrey. The claim of Bowen was dismissed, and the action proceeded upon the claim of Craft alone. It was tried by a referee, who found in favor of Craft, and a judgment was rendered by which the premises were ordered to be sold, and the claim of Craft paid from the proceeds of the sale, with the costs of suit. A motion for a new trial was made and denied, and the defendants, Packard, Bayley & Simpkins, appealed from the judg*569ment and the order overruling the motion for a new trial, to this Court.
After the filing of an amended complaint of intervention by Craft, the appellants moved to strike out certain portions thereof which state that before he, Craft, signed the sub-contract with Aubrey, he procured a writing from Aubrey directing the appellants to reserve in their hands sufficient money to pay Craft the amount of his contract with Aubrey; that he took this paper to Packard, and then proceeds to detail conversations between himself and Packard, and that afterwards he closed the contract with Aubrey; that Packard and Simpkins had made certain assertions to different persons, and that one of the appellants had admitted certain facts to him within the last six months. The Court refused to strike out this portion of the amended complaint, and this is assigned as error. The Court below, in our judgment, erred in overruling the motion to strike out. The matter objected to is clearly irrelevant, and does not comport with any rule of good pleading. It is opposed to the rules laid down in the case of Green v. Palmer (15 Cal. 411). But the respondent claims that that case was an action at law, that the present one is in equity, therefore, the rules there laid down do not apply hore; and that under the rules of equity pleading he had a right to set up matters merely of evidence in order to obtain the answer of the opposing parties to such facts, to be used against them on the trial. In other words, they claim the right to set up matters, usual in bills of discovery, under the old system of chancery practice. Under the code of practice we have but one system of rules respecting pleadings, which govern all cases, both at law and in equity. Those rules are clearly laid down in the Practice Act, and although, in construing that act, we resort to former adjudications, and the old and well-established principles of pleading, yet the former distinctions which existed between common law and equity pleadings no longer exist. The code has reduced all to one common system. In setting forth the facts of a case, which, under the old practice, would have been properly brought in a Court of Equity, they are generally stated in a mode similar to the statements in a bill in chancery, and to this there can be no objection so long as the principle of the code, which *570requires the facts to be stated in ordinary and concise language, is not violated. When the pleader goes beyond this, and attempts to introduce the peculiar formal allegations, many of which were mere fictions, found in the old forms of declarations in common law actions, or bills in equity, his pleading is liable to the objection of irrelevancy, and the objectionable matter should be stricken out on motion. In this case the pleader has attempted to obtain a “ discovery under oath ” by means of his pleading. This is forbidden by the four hundred and seventeenth section of the Practice Act, and the sections following it provide how such discovery can be obtained—that is, by examining the party as a witness. (Easterly v. Bassignano, 20 Cal. 489.)
It is also insisted that the Court below erred in rendering a judgment, giving the intervenor, Craft, a lien upon the property for the amount of his claim. The appellants, in them answer to the amended complaint of intervention, copy the contract between them and Aubrey in full, and then aver “ of which contract the said Craft before and at the time he became such sub-contractor under said Aubrey, had notice.” In his replication, Craft admits that he knew that Aubrey had agreed to erect the building for the appellants, but denies that he ever had “ any notice of the conditions of the contract,” or that he “ had any knowledge that Aubrey had contracted not to sublet” without the written permission of the appellants. He does not deny but that he knew of the agreement in Aubrey’s contract that no lien was to be filed on the premises. It is evident that Craft knew that there was a contract between Aubrey and the appellants, and that he was a sub-contractor under it. This was sufficient to put him upon inquiry, and he is to be considered as affected with notice of the contents and stipulations of the contract with Aubrey.
. When an owner of property has contracted with another to erect a building or other superstructure, or do any other work, or furnish materials therefor, all sub-contractors and parties agreeing to furnish labor or materials to such original contractor do so with reference to such original contract, in subordination to its provisions and to the rights of the respective parties thereto, so far as they relate to the liability of the owner or the property, or so far as they rely *571on such liability; and any agreement such parties may make with such original contractor is, so far as relates to the owner or the property, subject to all the terms, agreements, conditions, and stipulations of such original contract; and the owner or the properly cannot be held liable or bound to any extent beyond the terms of the original contract, or such new or further contract as he may make with the original contractor or the sub-contractors. Any other rule would place the owner and his property completely at the mercy of the contractor; would give the contractor the' power without any authority whatever, to make contracts binding the owner and his property. There is nothing in the relation of the parties which can, by any rule of law, vest in the contractor any such power. The owner cannot be held liable upon the contract between the original contractor and the sub-contractor, as there is no privity of contract between them. (Pierce on Am. R. R. Law, 387; Doughty v. Devlin, 1 E. D. Smith, 625; Foster v. Paillon, 2 Id. 556; Grogan v. The Mayor, etc., 2 Id. 695; Benedict v. The Danbury and Norfolk R. R., 24 Conn. 320.)
In the present case, Craft, as sub-contractor, has no higher rights than the original contractor. The original contractor, Aubrey, having by express agreement waived the right given him by the statute to file and enforce a lien upon the property, could not maintain an action to enforce any such lien. A party may always waive a right created by statute for his benefit, the same as any other. (Tombs v. The Rochester and Syracuse Railroad Co., 18 Barb., S. C., 583; Buel v. The Trustees of Lockport, 3 Comstock, 197.) Aubrey having thus waived his right to a lien, his subcontractor cannot claim any such right.
Several other questions are raised by the appellants, but it is not deemed necessary to notice them.
The judgment is reversed and the cause remanded.